code: def compute_actions(
      self, obs_batch=None, add_noise=False, update=True, **kwargs
  ):
      if "observation" in kwargs:
          assert obs_batch is None, (
              "You can not use both arguments, "
              "`observation` and `obs_batch`. `observation` "
              "is deprecated."
          )
          deprecation_warning(
              old="ESTFPolicy.compute_actions(observation=...)`",
              new="ESTFPolicy.compute_actions(obs_batch=...)",
          )
          obs_batch = kwargs["observation"]
      else:
          assert obs_batch is not None
      # Squeeze batch dimension (we always calculate actions for only a
      # single obs).
      observation = obs_batch[0]
      observation = self.preprocessor.transform(observation)
      observation = self.observation_filter(
          observation[None], update=update
      )
      # `actions` is a list of (component) batches.
      # Eager mode.
      if not self.sess:
          dist_inputs, _ = self.model(
              {SampleBatch.CUR_OBS: observation}
          )
          dist = self.dist_class(dist_inputs, self.model)
          actions = dist.sample()
          actions = tree.map_structure(lambda a: a.numpy(), actions)
      # Graph mode.
      else:
          actions = self.sess.run(
              self.sampler, feed_dict={self.inputs: observation}
          )
  
      if add_noise:
          actions = tree.map_structure(
              self._add_noise, actions, self.action_space_struct
          )
      # Convert `flat_actions` to a list of lists of action components
      # (list of single actions).
      actions = unbatch(actions)
      return actions, [], {}
  
imports: from typing import Optional
  import gymnasium
  import numpy
  import tree
  import ray
  import ray.experimental.tf_utils
  from ray.rllib.models import ModelCatalog
  from ray.rllib.policy.policy import Policy
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.utils import deprecation_warning
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.filter import get_filter
  from ray.rllib.utils.framework import try_import_tf
  from ray.rllib.utils.spaces.space_utils import get_base_struct_from_space, unbatch
label_desc: Use image node_id 2 for calling the ESTFPolicy obj's underlying member method code with example usage: obj.compute_actions(obs_batch, add_noise, update) and returns: actions,  list,  dict