code: def __init__(
      self,
      watermark=False,
      temperature=1.0,
      repetition_penalty=1.0,
      top_k=None,
      top_p=None,
      typical_p=None,
      do_sample=False,
      seed=0,
      device="cpu",
  ):
      self.watermark_processor = (
          WatermarkLogitsProcessor(device=device) if watermark else None
      )
      self.repetition_processor = (
          RepetitionPenaltyLogitsProcessor(penalty=repetition_penalty)
          if repetition_penalty
          else None
      )
  
      has_warpers = (
          (temperature is not None and temperature != 1.0)
          or (top_k is not None and top_k != 0)
          or (top_p is not None and top_p < 1.0)
          or (typical_p is not None and typical_p < 1.0)
      )
      if has_warpers:
          self.static_warper = static_warper(
              temperature=temperature,
              top_k=top_k,
              top_p=top_p,
              typical_p=typical_p,
          )
      else:
          self.static_warper = None
  
      sampling = do_sample or has_warpers
      self.choice = Sampling(seed, device) if sampling else Greedy()
  
imports: import re
  from typing import Callable, List, Optional, Tuple
  import torch
  from text_generation_server.pb import generate_pb2
  from text_generation_server.pb.generate_pb2 import FinishReason
  from text_generation_server.utils.logits_process import HeterogeneousProcessorWrapper, HeterogeneousRepetitionPenaltyLogitsProcessor, HeterogeneousTemperatureLogitsWarper, HeterogeneousTopKLogitsWarper, HeterogeneousTopPLogitsWarper, HeterogeneousTypicalLogitsWarper, static_warper
  from text_generation_server.utils.watermark import WatermarkLogitsProcessor
  from transformers import PreTrainedTokenizerBase, RepetitionPenaltyLogitsProcessor
label_desc: Use image node_id 1 to create a new NextTokenChooser object  with example: obj = NextTokenChooser(watermark, temperature, repetition_penalty, top_k, top_p, typical_p, do_sample, seed, device)