code: def _split_batch_into_microbatch(
      batch: List[torch.Tensor],
      *,
      _micro_batch_size: Optional[int] = None,
      _global_batch_size: Optional[int] = None,
  ) -> List[List[torch.Tensor]]:
      micro_batch_size = _micro_batch_size
      global_batch_size = _global_batch_size
      if micro_batch_size is None:
          micro_batch_size = get_micro_batch_size()
      if global_batch_size is None:
          global_batch_size = get_current_global_batch_size()
      for i in range(0, global_batch_size, micro_batch_size):
          yield [
              x[i * micro_batch_size : (i + 1) * micro_batch_size]
              for x in batch
          ]
  
imports: from typing import Optional, List, Union, Tuple
  import torch
  from torch.nn.parallel import DistributedDataParallel
  from apex.multi_tensor_apply import multi_tensor_applier
  from apex.transformer import parallel_state
  from apex.transformer.enums import ModelType
  from apex.transformer.microbatches import build_num_microbatches_calculator
  from apex.transformer.pipeline_parallel._timers import _Timers
label_desc: Use image node_id 10 for calling a global function with example usage: _split_batch_into_microbatch(batch) without return types