code: def __init__(
      self,
      scorer: CandidateScorer,
      score_type: str = C.SCORING_TYPE_DEFAULT,
      constant_length_ratio: Optional[float] = None,
      softmax_temperature: Optional[float] = None,
  ) -> None:
      super().__init__()
      self.score_type = score_type
      self.scorer = scorer
      self.constant_length_ratio = constant_length_ratio
      assert softmax_temperature is None, "not implemented"
  
imports: import logging
  import math
  import time
  from typing import Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from .None import constants
  from .None import data_io
  from .None import inference
  from .None import vocab
  from .beam_search import CandidateScorer
  from .model import SockeyeModel
  from .output_handler import OutputHandler
label_desc: Use image node_id 1 to create a new BatchScorer object from inherited base classes: pt.nn with example: obj = BatchScorer(scorer, score_type, constant_length_ratio, softmax_temperature)