code: def prepare_encoder_inputs(self, encoder_input):
      if self.use_char_source:
          encoder_inputs = (
              encoder_input["src_tokens"],
              encoder_input["src_lengths"],
              encoder_input["char_inds"],
              encoder_input["word_lengths"],
          )
      else:
          encoder_inputs = (
              encoder_input["src_tokens"],
              encoder_input["src_lengths"],
          )
      return encoder_inputs
  
imports: import math
  from typing import List, Tuple
  import torch
  from fairseq import search, utils
  from fairseq.models import FairseqIncrementalDecoder
  from pytorch_translate import utils
  from torch import Tensor
label_desc: Use image node_id 5 for calling the SequenceGenerator obj's underlying member method code with example usage: obj.prepare_encoder_inputs(encoder_input) and returns: encoder_inputs