class_docstr: Base class for TextGeneration Strategy
class_docstr_tok: ["Base","class","for","TextGeneration","Strategy"]
code: def forward_step(self, batch, tensor_shape):
      fwd_bwd_function = get_forward_backward_func()
      output_tensor = fwd_bwd_function(
          forward_step_func=self.model.get_forward_output_only_func(),
          data_iterator=iter(
              [
                  batch,
              ]
          ),
          model=[self.forward_model],
          num_microbatches=get_num_microbatches(),
          forward_only=True,
          seq_length=tensor_shape[0],
          micro_batch_size=tensor_shape[1],
      )
  
      return output_tensor
  
imports: import abc
  import copy
  import os
  import re
  import warnings
  from typing import List, Set, Tuple
  import torch
  from transformers import CLIPImageProcessor
  from nemo.collections.nlp.modules.common.lm_utils import pad_batch
  from nemo.collections.nlp.modules.common.megatron.utils import get_ltor_masks_and_position_ids
label_desc: Use image node_id 2 for calling the TextGenerationStrategy obj's underlying member method code with example usage: obj.forward_step(batch, tensor_shape) and returns: output_tensor