code: def _flatten_obs(obs):
      obs_pieces = []
      for v in obs.values():
          flat = np.array([v]) if np.isscalar(v) else v.ravel()
          obs_pieces.append(flat)
      return np.concatenate(obs_pieces, axis=0)
  
file_path: ray/rllib/env/wrappers/dm_control_wrapper.py
imports: from gymnasium import core, spaces
  import numpy
  from ray.rllib.utils.annotations import PublicAPI
label_desc: Use image node_id 2 for calling a global function with example usage: _flatten_obs(obs) and returns: np