code: def testSmoothedActions(
      self, smoothing_coefficient, expected_actions
  ):
      # Set up the smoothing policy.
      policy = StateIncrementPolicy(
          self._time_step_spec, self._action_spec
      )
      smoothed_policy = (
          temporal_action_smoothing.TemporalActionSmoothing(
              policy, smoothing_coefficient
          )
      )
  
      # Create actions sampled in time order.
      policy_state = smoothed_policy.get_initial_state(batch_size=1)
      smoothed_actions = []
      for _ in range(5):
          (
              action,
              policy_state,
              unused_policy_info,
          ) = smoothed_policy.action(
              self._time_step, policy_state=policy_state
          )
          smoothed_actions.append(action)
  
      # Make sure smoothed actions are as expected.
      smoothed_actions_ = self.evaluate(smoothed_actions)
      self.assertAllClose(
          np.squeeze(smoothed_actions_), expected_actions
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  from six.moves import range
  import tensorflow
  from tf_agents.policies import temporal_action_smoothing
  from tf_agents.policies import tf_policy
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import policy_step
  from tf_agents.trajectories import time_step
  from tf_agents.utils import test_utils
label_desc: Use image node_id 4 for calling the TemporalActionSmoothingTest obj's underlying member method code with example usage: obj.testSmoothedActions(smoothing_coefficient, expected_actions) without return types