code: def get_batch(model, tokenizer, context_tokens):
      """Generate batch from context tokens."""
      # Move to GPU.
      tokens = context_tokens.contiguous().cuda()
      # Get the attention mask and postition ids.
      attention_mask, _, position_ids = get_ltor_masks_and_position_ids(
          tokens,
          tokenizer.eos_id,
          model.cfg.get("reset_position_ids", False),
          model.cfg.get("reset_attention_mask", False),
          model.cfg.get("eod_mask_loss", False),
      )
  
      return tokens, attention_mask, position_ids
  
imports: import os
  import pickle
  import re
  from collections.abc import Iterable
  from functools import partial
  from typing import Callable, Tuple
  import numpy
  import torch
  import torch.nn.functional
  from nemo.collections.common.tokenizers.tabular_tokenizer import TabularTokenizer
  from nemo.collections.nlp.modules.common.megatron.utils import get_ltor_masks_and_position_ids
  from nemo.collections.nlp.modules.common.text_generation_strategy import model_inference_strategy_dispatcher
  from nemo.collections.nlp.modules.common.transformer.text_generation import LengthParam, OutputType, SamplingParam
  from nemo.utils import AppState
label_desc: Use image node_id 6 for calling a global function with example usage: get_batch(model, tokenizer, context_tokens) and returns: tokens,  attention_mask,  position_ids