code: def infer_types(program, inputs, backend):
      """Infers the variable types of a given program.
  
      Args:
        program: `instructions.Program` whose types to infer.
        inputs: A `list` of backend-compatible tensors aligned with
          `program.vars_in`.
        backend: Backend implementation.
  
      Returns:
        typed: `instructions.Program` with types inferred.
  
      Raises:
        ValueError: If some types still remain incomplete after inference.
      """
      sig = signature(program, inputs, backend)
      return infer_types_from_signature(program, sig, backend)
  
file_path: probability/tensorflow_probability/python/experimental/auto_batching/type_inference.py
imports: import contextlib
  import functools
  from absl import logging
  import six
  from tensorflow_probability.python.experimental.auto_batching import instructions
label_desc: Use image node_id 10 for calling a global function with example usage: infer_types(program, inputs, backend) and returns: infer_types_from_signature