class_docstr: Exposes a Python policy as wrapper over a TF Policy.
class_docstr_tok: ["Exposes","a","Python","policy","as","wrapper","over","a","TF","Policy","."]
code: def _build_from_time_step(self, time_step):
      outer_shape = nest_utils.get_outer_array_shape(
          time_step, self._time_step_spec
      )
      if len(outer_shape) == 1:
          self.initialize(outer_shape[0])
      elif not outer_shape:
          self.initialize(None)
      else:
          raise ValueError(
              "Cannot handle more than one outer dimension. Saw {} outer "
              "dimensions: {}".format(len(outer_shape), outer_shape)
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Optional, Text
  from absl import logging
  import tensorflow
  from tf_agents.policies import py_policy
  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.typing import types
  from tf_agents.utils import common
  from tf_agents.utils import nest_utils
  from tf_agents.utils import session_utils
label_desc: Use image node_id 6 for calling the PyTFPolicy obj's underlying member method code with example usage: obj._build_from_time_step(time_step) without return types