code: def __init__(self):
      self.length_penalty = lambda x, alpha: 1.0
      self.cov_penalty = lambda cov, beta: torch.zeros(
          (1, cov.shape[-2]), device=cov.device, dtype=torch.float
      )
      self.has_cov_pen = False
      self.has_len_pen = False
  
imports: import unittest
  from onmt.translate.beam_search import BeamSearch, GNMTGlobalScorer
  from onmt.translate.beam_search import BeamSearchLM
  from copy import deepcopy
  import torch
label_desc: Use image node_id 1 to create a new GlobalScorerStub object from inherited base classes: object with example: obj = GlobalScorerStub()