docstr: test flatten and unflatten functions directly
docstr_tok: ["test","flatten","and","unflatten","functions","directly"]
code: def test_flatten_unflatten(self, observation_space, ordered_values):
      """
      test flatten and unflatten functions directly
      """
      original = observation_space.sample()
  
      flattened = flatten(observation_space, original)
      unflattened = unflatten(observation_space, flattened)
  
      self._check_observations(
          original, flattened, unflattened, ordered_values
      )
  
file_path: gym/tests/wrappers/test_flatten.py
imports: from collections import OrderedDict
  from typing import Optional
  import numpy
  import pytest
  import gym
  from gym.spaces import Box, Dict, flatten, unflatten
  from gym.wrappers import FlattenObservation
label_desc: Use image node_id 2 for calling the TestFlattenEnvironment obj's underlying member method code with example usage: obj.test_flatten_unflatten(observation_space, ordered_values) without return types