code: def make_environment_spec(
      environment: dm_env.Environment,
  ) -> EnvironmentSpec:
      """Returns an `EnvironmentSpec` describing values used by an environment."""
      return EnvironmentSpec(
          observations=environment.observation_spec(),
          actions=environment.action_spec(),
          rewards=environment.reward_spec(),
          discounts=environment.discount_spec(),
      )
  
imports: from typing import Any, NamedTuple
  import dm_env
  from dm_env import specs
label_desc: Use image node_id 1 for calling a global function with example usage: make_environment_spec(environment) and returns: EnvironmentSpec