code: def __init__(
      self,
      dtype: torch.dtype,
      device: torch.device,
      watermark: List[bool],
      temperature: List[float],
      repetition_penalty: List[float],
      top_k: List[int],
      top_p: List[float],
      typical_p: List[float],
      do_sample: List[bool],
      seeds: List[int],
  ):
      warpers = []
  
      self.watermark_processor = (
          HeterogeneousProcessorWrapper(
              {
                  i: WatermarkLogitsProcessor(device=device)
                  for i, do_watermark in enumerate(watermark)
                  if do_watermark
              }
          )
          if any(watermark)
          else None
      )
  
      self.repetition_processor = (
          HeterogeneousRepetitionPenaltyLogitsProcessor(
              repetition_penalty, dtype, device
          )
          if any([x != 1.0 for x in repetition_penalty])
          else None
      )
  
      if any([x != 1.0 for x in temperature]):
          do_sample = [
              sample or x != 1.0
              for x, sample in zip(temperature, do_sample)
          ]
          warpers.append(
              HeterogeneousTemperatureLogitsWarper(
                  temperature, dtype, device
              )
          )
  
      if any([x != 0 for x in top_k]):
          do_sample = [
              sample or x != 0 for x, sample in zip(top_k, do_sample)
          ]
          warpers.append(HeterogeneousTopKLogitsWarper(top_k, device))
  
      if any([x < 1.0 for x in top_p]):
          do_sample = [
              sample or x < 1.0 for x, sample in zip(top_p, do_sample)
          ]
          warpers.append(
              HeterogeneousTopPLogitsWarper(top_p, dtype, device)
          )
  
      if any([x < 1.0 for x in typical_p]):
          do_sample = [
              sample or x < 1.0
              for x, sample in zip(typical_p, do_sample)
          ]
          warpers.append(
              HeterogeneousTypicalLogitsWarper(typical_p, dtype, device)
          )
  
      self.warpers = warpers
  
      if any(do_sample):
          self.choice = HeterogeneousSampling(do_sample, seeds, device)
      else:
          self.choice = Greedy()
  
      self.seeds = seeds
      self.do_sample = do_sample
      self.dtype = dtype
      self.device = device
  
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 HeterogeneousNextTokenChooser object  with example: obj = HeterogeneousNextTokenChooser(dtype, device, watermark, temperature, repetition_penalty, top_k, top_p, typical_p, do_sample, seeds)