code: def tf_assert(
      self,
      *,
      x,
      batch_size=None,
      include_type_shape=False,
      message=None,
  ):
      if not isinstance(x, TensorDict):
          raise TensorforceError(
              message.format(
                  name="",
                  issue=("type {} != TensorDict".format(type(x))),
              )
          )
  
      assertions = list()
      for name, spec, x in self.zip_items(x):
          if name is None:
              name = ""
          assertions.extend(
              spec.tf_assert(
                  x=x,
                  batch_size=batch_size,
                  include_type_shape=include_type_shape,
                  message=(
                      None
                      if message is None
                      else message.format(name=name, issue="{issue}")
                  ),
              )
          )
  
      return assertions
  
file_path: tensorforce/tensorforce/core/utils/tensors_spec.py
imports: from tensorforce import TensorforceError
  from tensorforce.core.utils import ArrayDict, NestedDict, SignatureDict, TensorDict, TensorSpec
label_desc: Use image node_id 6 for calling the TensorsSpec obj's underlying member method code with example usage: obj.tf_assert() and returns: assertions