class_docstr: Version of fairseq.data.LanguagePairDataset which represents source
  sentences as sequences of words, each represented as a sequence of
  characters (with numberized indices for both words and characters).
  Right-padded only.
code: def collater(self, samples):
      if len(samples) == 0:
          return {}
      source_data = self.collate_source(samples)
      target, prev_output_tokens, ntokens = None, None, None
      if self.tgt:
          target, prev_output_tokens, ntokens = self.collate_targets(
              samples
          )
  
      return {
          "id": source_data["id"],
          "ntokens": ntokens,
          "net_input": {
              "src_tokens": source_data["src_tokens"],
              "src_lengths": source_data["src_lengths"],
              "char_inds": source_data["char_inds"],
              "word_lengths": source_data["word_lengths"],
              "prev_output_tokens": prev_output_tokens,
          },
          "target": target,
          "weights": source_data["weights"],
      }
  
imports: from typing import Any, Dict
  import numpy
  import torch
  from fairseq import data, tokenizer
  from fvcore.common.file_io import PathManager
  from pytorch_translate import vocab_constants
  from pytorch_translate.data.dictionary import TAGS
label_desc: Use image node_id 7 for calling the LanguagePairSourceCharDataset obj's underlying member method code with example usage: obj.collater(samples) and returns: dict, dict