class_docstr: [`LogitsWarper`] that performs top-p, i.e. restricting to top tokens summing to prob_cut_off <= prob_cut_off.
  This version allows for a separate value for each sample and runs inplace when possible.
  It doesn't validate inputs.
  
  Args:
      top_p (`float`):
          If set to < 1, only the smallest set of most probable tokens with probabilities that add up to `top_p` or
          higher are kept for generation.
      filter_value (`float`, *optional*, defaults to `-float("Inf")`):
          All filtered values will be set to this float value.
      min_tokens_to_keep (`int`, *optional*, defaults to 1):
          Minimum number of tokens that cannot be filtered.
code: def filter(self, indices):
      self.top_p = [self.top_p[i] for i in indices]
      if any([x < 1.0 for x in self.top_p]):
          self.top_p_opposite = self.top_p_opposite[indices]
          return self
      return None
  
imports: import math
  import torch
  from functools import lru_cache
  from typing import Optional, List, Dict, Union
  from transformers import LogitsWarper, LogitsProcessor, TemperatureLogitsWarper, TopKLogitsWarper, TopPLogitsWarper, TypicalLogitsWarper
label_desc: Use image node_id 3 for calling the HeterogeneousTopPLogitsWarper obj's underlying member method code with example usage: obj.filter(indices) and returns: None, self