code: def _get_greenlist_ids(
      self,
      input_ids: Union[List[int], torch.LongTensor],
      max_value: int,
      device: torch.device,
  ) -> List[int]:
      # seed the rng using the previous tokens/prefix
      self._seed_rng(input_ids)
  
      greenlist_size = int(max_value * self.gamma)
      vocab_permutation = torch.randperm(
          max_value, device=device, generator=self.rng
      )
      greenlist_ids = vocab_permutation[:greenlist_size]
      return greenlist_ids
  
file_path: text-generation-inference/server/text_generation_server/utils/watermark.py
imports: import os
  import torch
  from transformers import LogitsProcessor
  from typing import List, Union
label_desc: Use image node_id 3 for calling the WatermarkLogitsProcessor obj's underlying member method code with example usage: obj._get_greenlist_ids(input_ids, max_value, device) and returns: greenlist_ids