code: def merge_batch_dims(
      tensor: type_alias.TensorLike, last_axis: int
  ) -> type_alias.TensorLike:
      """Merges all dimensions into one starting from 0 till `last_axis` exluding."""
      return tf.reshape(
          tensor, [-1] + tensor.shape.as_list()[last_axis:]
      )
  
imports: from typing import List, Optional
  import tensorflow
  from tensorflow_graphics.util import type_alias
label_desc: Use image node_id 2 for calling a global function with example usage: merge_batch_dims(tensor, last_axis) and returns: tf