code: def _prepare_logits_processor(
      top_k: Optional[int] = None,
      top_p: Optional[float] = None,
      temperature: Optional[float] = None,
  ) -> LogitsProcessorList:
      processor_list = LogitsProcessorList()
      if temperature is not None and temperature != 1.0:
          processor_list.append(TemperatureLogitsWarper(temperature))
      if top_k is not None and top_k != 0:
          processor_list.append(TopKLogitsWarper(top_k))
      if top_p is not None and top_p < 1.0:
          processor_list.append(TopPLogitsWarper(top_p))
      return processor_list
  
file_path: colossalai/applications/Chat/coati/models/generation.py
imports: from typing import Any, Callable, Optional
  import torch
  import torch.distributed
  from transformers import PreTrainedTokenizer
  from .base import Actor
label_desc: Use image node_id 1 for calling a global function with example usage: _prepare_logits_processor(top_k, top_p, temperature) and returns: processor_list