class_docstr: Returned with every call to `step` and `reset` on an environment.
  
  A `TimeStep` contains the data emitted by an environment at each step of
  interaction. A `TimeStep` holds a `step_type`, an `observation` (typically a
  NumPy array or a dict or list of arrays), and an associated `reward` and
  `discount`.
  
  The first `TimeStep` in a sequence will equal `StepType.FIRST`. The final
  `TimeStep` will equal `StepType.LAST`. All other `TimeStep`s in a sequence
  will equal `StepType.MID.
  
  Attributes:
    step_type: a `Tensor` or array of `StepType` enum values.
    reward: a `Tensor` or array of reward values.
    discount: A discount value in the range `[0, 1]`.
    observation: A NumPy array, or a nested dict, list or tuple of arrays.
class_docstr_tok: ["Returned","with","every","call","to","`","step","`","and","`","reset","`","on","an","environment",".","A","`","TimeStep","`","contains","the","data","emitted","by","an","environment","at","each","step","of","interaction",".","A","`","TimeStep","`","holds","a","`","step_type","`",",","an","`","observation","`","(","typically","a","NumPy","array","or","a","dict","or","list","of","arrays",")",",","and","an","associated","`","reward","`","and","`","discount","`",".","The","first","`","TimeStep","`","in","a","sequence","will","equal","`","StepType.FIRST","`",".","The","final","`","TimeStep","`","will","equal","`","StepType.LAST","`",".","All","other","`","TimeStep","`","s","in","a","sequence","will","equal","`","StepType.MID",".","Attributes",":","step_type",":","a","`","Tensor","`","or","array","of","`","StepType","`","enum","values",".","reward",":","a","`","Tensor","`","or","array","of","reward","values",".","discount",":","A","discount","value","in","the","range","`","[","0",",","1","]","`",".","observation",":","A","NumPy","array",",","or","a","nested","dict",",","list","or","tuple","of","arrays","."]
code: def is_first(self) -> types.Bool:
      if tf.is_tensor(self.step_type):
          return tf.equal(self.step_type, StepType.FIRST)
      return np.equal(self.step_type, StepType.FIRST)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import pprint
  from typing import NamedTuple, Optional
  import numpy
  import tensorflow
  from tf_agents.specs import array_spec
  from tf_agents.specs import tensor_spec
  from tf_agents.typing import types
label_desc: Use image node_id 1 for calling the TimeStep obj's underlying member method code with example usage: obj.is_first() and returns: np, tf