def __init__(self, env, actions):
super(BinarySpaceToDiscreteSpaceEnv, self).__init__(env)<EOL>self.action_space = gym.spaces.Discrete(len(actions))<EOL>self._action_map = {}<EOL>self._action_meanings = {}<EOL>for action, button_list in enumerate(actions):<EOL><INDENT>byte_action = <NUM_LIT:0><EOL>for button in button_list:<EOL><INDENT>byte_action |= self._button_map[button]<EOL><DEDENT>self._action_map[action] = byte_action<EOL>self._action_meanings[action] = '<STR_LIT:U+0020>'.join(button_list)<EOL><DEDENT>
Initialize a new binary to discrete action space wrapper.

Args:
    env (gym.Env): the environment to wrap
    actions (list): an ordered list of actions (as lists of buttons).
        The index of each button list is its discrete coded value

Returns:
    None