code: def _get_initial_policy_state(policy, time_steps):
      """Gets the initial state of a policy."""
      batch_size = (
          tf.compat.dimension_at_index(time_steps.discount.shape, 0)
          or tf.shape(time_steps.discount)[0]
      )
      return policy.get_initial_state(batch_size=batch_size)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from typing import Callable, Optional, Text
  import gin
  import numpy
  import tensorflow
  from tf_agents.agents import data_converter
  from tf_agents.agents import tf_agent
  from tf_agents.networks import network
  from tf_agents.policies import actor_policy
  from tf_agents.policies import greedy_policy
  from tf_agents.trajectories import time_step
  from tf_agents.trajectories import trajectory
  from tf_agents.typing import types
  from tf_agents.utils import common
  from tf_agents.utils import eager_utils
  from tf_agents.utils import nest_utils
  from tf_agents.utils import value_ops
label_desc: Use image node_id 3 for calling a global function with example usage: _get_initial_policy_state(policy, time_steps) and returns: policy