class_docstr: Abstract base class for all beam scorers that are used for [`~PreTrainedModel.beam_search`] and
  [`~PreTrainedModel.beam_sample`].
class_docstr_tok: ["Abstract","base","class","for","all","beam","scorers","that","are","used","for","[","`","~PreTrainedModel.beam_search","`","]","and","[","`","~PreTrainedModel.beam_sample","`","]","."]
code: def process(
      self,
      input_ids: torch.LongTensor,
      next_scores: torch.FloatTensor,
      next_tokens: torch.LongTensor,
      next_indices: torch.LongTensor,
      **kwargs,
  ) -> Tuple[torch.Tensor]:
      raise NotImplementedError("This is an abstract method.")
  
imports: from abc import ABC, abstractmethod
  from collections import UserDict
  from typing import Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from ..utils import add_start_docstrings
  from .beam_constraints import Constraint, ConstraintListState
label_desc: Use image node_id 1 for calling the BeamScorer obj's underlying member method code with example usage: obj.process(input_ids, next_scores, next_tokens, next_indices) without return types