code: def get_symbols_to_strip_from_output(generator):
      if hasattr(generator, "symbols_to_strip_from_output"):
          return generator.symbols_to_strip_from_output
      else:
          return {generator.eos}
  
file_path: fairseq/fairseq_cli/generate.py
imports: import ast
  import logging
  import math
  import os
  import sys
  from argparse import Namespace
  from itertools import chain
  import numpy
  import torch
  from omegaconf import DictConfig
  from fairseq import checkpoint_utils, options, scoring, tasks, utils
  from fairseq.dataclass.utils import convert_namespace_to_omegaconf
  from fairseq.logging import progress_bar
  from fairseq.logging.meters import StopwatchMeter, TimeMeter
label_desc: Use image node_id 2 for calling a global function with example usage: get_symbols_to_strip_from_output(generator) and returns: generator, unknown