code: def _get_temperatures(input_metadata: InputMetadata) -> List[float]:
      # Collect the temperatures for the logits.
      temperatures: List[float] = []
      for seq_group in input_metadata.seq_groups:
          seq_ids, sampling_params = seq_group
          temperature = sampling_params.temperature
          if temperature < _SAMPLING_EPS:
              # NOTE: Zero temperature means deterministic sampling
              # (i.e., greedy sampling or beam search).
              # Set the temperature to 1 to avoid division by zero.
              temperature = 1.0
          temperatures += [temperature] * len(seq_ids)
      return temperatures
  
imports: from typing import Dict, List, Optional, Tuple
  import torch
  import torch.nn
  from bigdl.llm.vllm.model_executor.input_metadata import InputMetadata
  from bigdl.llm.vllm.sampling_params import SamplingParams, SamplingType
  from bigdl.llm.vllm.sequence import SamplerOutput, SequenceGroupMetadata, SequenceData, SequenceOutputs
  import time
label_desc: Use image node_id 5 for calling a global function with example usage: _get_temperatures(input_metadata) and returns: temperatures