code: def _add_incompatible_batch_dim(type_pat):
      """Adds a batch dim incompatible with all other known dims."""
      new_batch_dim = 2
      for tp in instructions.pattern_traverse(
          type_pat, leaf_type=instructions.TensorType
      ):
          new_batch_dim = max(new_batch_dim, max((0,) + tp.shape) + 1)
      log_debug("using incompatible batch dim %d", new_batch_dim)
  
      def add_batch_dim_one_var(type_):
          return instructions.Type(
              instructions.pattern_map(
                  lambda t: instructions.TensorType(
                      t.dtype, (new_batch_dim,) + t.shape
                  ),
                  type_.tensors,
                  leaf_type=instructions.TensorType,
              )
          )
  
      return instructions.pattern_map(
          add_batch_dim_one_var, type_pat, leaf_type=instructions.Type
      )
  
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 13 for calling a global function with example usage: _add_incompatible_batch_dim(type_pat) and returns: instructions, instructions