code: def create_model_variable(max_stack_depth, value):
      """Returns a new ModelVariable.
  
      Args:
        max_stack_depth: int, Maximum stack depth to enforce.
        value: Initial value. The value is expected to already be
          batched; thus defines the batch size, dtype, and data shape.
  
      Returns:
        var: The new variable.
  
      Raises:
        ValueError: If `max_stack_depth` is less than 1, as that leaves
          no room for ensuring the stacks are non-empty.
      """
      if max_stack_depth < 1:
          template = (
              "Cannot make a non-empty stack with maximum depth {}"
          )
          raise ValueError(template.format(max_stack_depth))
      stacks = [[v] for v in value]
      return ModelVariable(max_stack_depth, stacks)
  
file_path: probability/tensorflow_probability/python/experimental/auto_batching/backend_test_lib.py
imports: from absl import logging
label_desc: Use image node_id 1 for calling a global function with example usage: create_model_variable(max_stack_depth, value) and returns: ModelVariable