class_docstr: A policy that outputs a constant action, for testing purposes.
class_docstr_tok: ["A","policy","that","outputs","a","constant","action",",","for","testing","purposes","."]
code: def _action(self, time_step, policy_state, seed=None):
      batch_size = tf.compat.dimension_value(
          tf.shape(time_step.observation)[0]
      )
      return policy_step.PolicyStep(
          tf.fill([batch_size], self._constant_action),
          policy_state,
          {
              "a": tf.range(batch_size, dtype=tf.int32),
              "b": tf.ones(shape=[batch_size, 4], dtype=tf.float32),
          },
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import tensorflow
  import tensorflow_probability
  from tf_agents.bandits.policies import mixture_policy
  from tf_agents.policies import policy_saver
  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 ConstantPolicy obj's underlying member method code with example usage: obj._action(time_step, policy_state, seed) and returns: policy_step