code: def _parameterized_setup(
      discount_spec: Optional[types.NestedSpec] = None,
      reward_spec: Optional[types.NestedSpec] = None,
  ):
      """Common setup code that, unlike self.setUp, takes arguments.
  
      Args:
        discount_spec: None, or a (nested) specs.BoundedArray.
        reward_spec: None, or a (nested) specs.Array.
      Returns:
        environment, actor, loop
      """
      env_kwargs = {"episode_length": EPISODE_LENGTH}
      if discount_spec:
          env_kwargs["discount_spec"] = discount_spec
      if reward_spec:
          env_kwargs["reward_spec"] = reward_spec
  
      environment = fakes.DiscreteEnvironment(**env_kwargs)
      actor = fakes.Actor(specs.make_environment_spec(environment))
      loop = environment_loop.EnvironmentLoop(environment, actor)
      return actor, loop
  
file_path: acme/acme/environment_loop_test.py
imports: from typing import Optional
  from acme import environment_loop
  from acme import specs
  from acme import types
  from acme.testing import fakes
  import numpy
  from absl.testing import absltest
  from absl.testing import parameterized
label_desc: Use image node_id 1 for calling a global function with example usage: _parameterized_setup(discount_spec, reward_spec) and returns: actor,  loop