code: def get_source_tokens_tensor(src_tokens):
      """
      To enable integration with PyText, src_tokens should be able to support
      more features than just token embeddings. Hence when dictionary features are
      passed from PyText it will be passed as a tuple
      (token_embeddings, dict_feat, ..). Thus, in this case where we need the source
      tokens tensor (eg to calculate batch size = source_tokens_tensor.size(0)),
      we get the first element on the tuple which is always guaranteed
      to be source tokens and do the necessary operation.
      eg : bsz, _ = get_source_tokens_tensor(source_tokens)[0].size(0)
      """
      if type(src_tokens) is tuple:
          return src_tokens[0]
      else:
          return src_tokens
  
imports: import argparse
  import ast
  import os
  import signal
  import threading
  import time
  from typing import Dict, List, Optional, Union
  import torch
  from fairseq import distributed_utils, tasks, utils
  from pytorch_translate.file_io import PathManager
label_desc: Use image node_id 10 for calling a global function with example usage: get_source_tokens_tensor(src_tokens) and returns: src_tokens, src_tokens