def get_space(space):
    if hasattr(space, 'n'):
        return (space.n, spaces.discrete, None)
    elif hasattr(space, 'shape'):
        return (np.prod(space.shape), spaces.box, (space.low, space.high))
def get_space(space):
    if hasattr(space, 'n'):
        return (space.n, spaces.discrete, None)
    elif hasattr(space, 'shape'):
        return (np.prod(space.shape), spaces.box, (space.low, space.high))