code: def get_mock_env(action_spec, observation_spec, step_return):
      env = mock.MagicMock()
  
      env.observation_spec = lambda: observation_spec
      time_step_spec = ts.time_step_spec(observation_spec)
      env.time_step_spec = lambda: time_step_spec
      env.action_spec = lambda: action_spec
      env.step = lambda: step_return
      env.step.reset = lambda: step_return
      env.batch_size = None
      return env
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing.absltest import mock
  import numpy
  from tf_agents.environments import random_py_environment
  from tf_agents.environments import utils
  from tf_agents.specs import array_spec
  from tf_agents.trajectories import time_step
  from tf_agents.utils import test_utils
label_desc: Use image node_id 1 for calling a global function with example usage: get_mock_env(action_spec, observation_spec, step_return) and returns: env