code: def _get_top_p_top_k(
      input_metadata: InputMetadata,
      vocab_size: int,
  ) -> Tuple[List[float], List[int]]:
      top_ps: List[float] = []
      top_ks: List[int] = []
      for seq_group in input_metadata.seq_groups:
          seq_ids, sampling_params = seq_group
          top_p = sampling_params.top_p
          # k should not be greater than the vocab size.
          top_k = min(sampling_params.top_k, vocab_size)
          # k=-1 means no truncation.
          top_k = vocab_size if top_k == -1 else top_k
          top_ps += [top_p] * len(seq_ids)
          top_ks += [top_k] * len(seq_ids)
      return top_ps, top_ks
  
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 6 for calling a global function with example usage: _get_top_p_top_k(input_metadata, vocab_size) and returns: top_ps,  top_ks