code: def transform_to_batch_sequence_dim(tensor: Tensor) -> Tensor:
      if len(tensor.size()) == 3:
          return tensor
      else:
          assert len(tensor.size()) == 4
          return tensor.contiguous().view(
              -1, tensor.size(-2), tensor.size(-1)
          )
  
label_desc: Use image node_id 2 for calling a global function with example usage: transform_to_batch_sequence_dim(tensor) and returns: tensor, tensor