code: def build_scorer(choice, tgt_dict):
      _choice = (
          choice._name if isinstance(choice, DictConfig) else choice
      )
  
      if _choice == "bleu":
          from fairseq.scoring import bleu
  
          return bleu.Scorer(
              bleu.BleuConfig(
                  pad=tgt_dict.pad(),
                  eos=tgt_dict.eos(),
                  unk=tgt_dict.unk(),
              )
          )
      return _build_scorer(choice)
  
file_path: fairseq/fairseq/scoring/__init__.py
imports: import importlib
  import os
  from abc import ABC, abstractmethod
  from fairseq import registry
  from omegaconf import DictConfig
label_desc: Use image node_id 1 for calling a global function with example usage: build_scorer(choice, tgt_dict) and returns: _build_scorer, bleu