class_docstr: Select the sample with the highest log probabilities, penalized using either
  a simple length normalization or Google NMT paper's length penalty
class_docstr_tok: ["Select","the","sample","with","the","highest","log","probabilities",",","penalized","using","either","a","simple","length","normalization","or","Google","NMT","paper","'s","length","penalty"]
code: def __init__(self, length_penalty: Optional[float]):
      self.length_penalty = length_penalty
  
imports: from dataclasses import dataclass, field, replace
  from typing import TYPE_CHECKING, Dict, Iterable, List, Optional, Sequence, Tuple, Union
  import numpy
  import torch
  import torch.nn.functional
  from torch import Tensor
  from torch.distributions import Categorical
  from .audio import CHUNK_LENGTH
  from .tokenizer import Tokenizer, get_tokenizer
  from .utils import compression_ratio
label_desc: Use image node_id 1 to create a new MaximumLikelihoodRanker object from inherited base classes: SequenceRanker with example: obj = MaximumLikelihoodRanker(length_penalty)