code: def get_agent_spec(
      env_spec: specs.EnvironmentSpec, agent_id: types.AgentID
  ) -> specs.EnvironmentSpec:
      """Returns a single agent spec from environment spec.
  
      Args:
        env_spec: environment spec, wherein observation, action, and reward specs
          are simply lists (with each entry specifying the respective spec for the
          given agent index). Discounts are scalars shared amongst agents.
        agent_id: agent index.
      """
      return specs.EnvironmentSpec(
          actions=env_spec.actions[agent_id],
          discounts=env_spec.discounts,
          observations=env_spec.observations[agent_id],
          rewards=env_spec.rewards[agent_id],
      )
  
imports: from acme import specs
  from acme.multiagent import types
  import dm_env
label_desc: Use image node_id 1 for calling a global function with example usage: get_agent_spec(env_spec, agent_id) and returns: specs