class_docstr: Implements the TF backend ops for a PC auto-batching VM.
docstr: Runs the given `primitive_callable` with dummy input.
  
  This is useful for examining the outputs for the purpose of type inference.
  
  Args:
    primitive_callable: A python callable.
    input_types: `list` of `instructions.Type` type of each argument to the
      callable.  Note that the contained `TensorType` objects must match the
      dimensions with which the primitive is to be invoked at runtime, even
      though type inference conventionally does not store the batch dimension
      in the `TensorType`s.
  
  Returns:
    outputs: pattern of backend-specific objects whose types may be
      analyzed by the caller with `type_of`.
docstr_tok: ["Runs","the","given","`","primitive_callable","`","with","dummy","input",".","This","is","useful","for","examining","the","outputs","for","the","purpose","of","type","inference",".","Args",":","primitive_callable",":","A","python","callable",".","input_types",":","`","list","`","of","`","instructions.Type","`","type","of","each","argument","to","the","callable",".","Note","that","the","contained","`","TensorType","`","objects","must","match","the","dimensions","with","which","the","primitive","is","to","be","invoked","at","runtime",",","even","though","type","inference","conventionally","does","not","store","the","batch","dimension","in","the","`","TensorType","`","s",".","Returns",":","outputs",":","pattern","of","backend-specific","objects","whose","types","may","be","analyzed","by","the","caller","with","`","type_of","`","."]
code: def run_on_dummies(self, primitive_callable, input_types):
      """Runs the given `primitive_callable` with dummy input.
  
      This is useful for examining the outputs for the purpose of type inference.
  
      Args:
        primitive_callable: A python callable.
        input_types: `list` of `instructions.Type` type of each argument to the
          callable.  Note that the contained `TensorType` objects must match the
          dimensions with which the primitive is to be invoked at runtime, even
          though type inference conventionally does not store the batch dimension
          in the `TensorType`s.
  
      Returns:
        outputs: pattern of backend-specific objects whose types may be
          analyzed by the caller with `type_of`.
      """
      with tf.name_scope("VM.run_on_dummies"):
          # We cannot use a temporary graph in eager mode because user code may
          # close over eager tensors, causing `RuntimeError: Attempting to capture
          # an EagerTensor without building a function.`
          # In graph mode, capturing user Tensors has also been a problem, because
          # TF doesn't like the inputs of an op being in different graphs.
          # Status quo is unfortunate because it involves running the computation
          # in the primop to determine its shape behavior, instead of just invoking
          # shape inference.
          # There may be a solution involving FuncGraph; see b/118896442.
          def mk_placeholder(vt):
              return tf.ones(vt.shape, dtype=vt.dtype)
  
          phs = [
              instructions.pattern_map(
                  mk_placeholder,
                  vtype.tensors,
                  leaf_type=instructions.TensorType,
              )
              for vtype in input_types
          ]
          return primitive_callable(*phs)
  
imports: import collections
  import contextlib
  import six
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.auto_batching import instructions
  from tensorflow_probability.python.experimental.auto_batching import xla
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow.python.ops import control_flow_util
label_desc: Use image node_id 4 for calling the TensorFlowBackend obj's underlying member method code with example usage: obj.run_on_dummies(primitive_callable, input_types) and returns: primitive_callable, tf