code: def unflatten(space: Space[T], x: FlatType) -> T:
      """Unflatten a data point from a space.
  
      This reverses the transformation applied by :func:`flatten`. You must ensure
      that the ``space`` argument is the same as for the :func:`flatten` call.
  
      Args:
          space: The space used to unflatten ``x``
          x: The array to unflatten
  
      Returns:
          A point with a structure that matches the space.
  
      Raises:
          NotImplementedError: if the space is not defined in ``gym.spaces``.
      """
      raise NotImplementedError(f"Unknown space: `{space}`")
  
imports: import operator
  from collections import OrderedDict
  from functools import reduce, singledispatch
  from typing import Dict
  from typing import TypeVar, Union, cast
  import numpy
  from gym.spaces import Box, Dict, Discrete, Graph, GraphInstance, MultiBinary, MultiDiscrete, Sequence, Space, Text, Tuple
label_desc: Use image node_id 18 for calling a global function with example usage: unflatten(space, x) without return types