class_docstr: :class:`AbstractSampler` is a abstract class, all sampler should inherit from it. This sampler supports returning
  a certain number of random value_ids according to the input key_id, and it also supports to prohibit
  certain key-value pairs by setting used_ids.
  
  Args:
      distribution (str): The string of distribution, which is used for subclass.
  
  Attributes:
      used_ids (numpy.ndarray): The result of :meth:`get_used_ids`.
class_docstr_tok: [":","class",":","`","AbstractSampler","`","is","a","abstract","class",",","all","sampler","should","inherit","from","it",".","This","sampler","supports","returning","a","certain","number","of","random","value_ids","according","to","the","input","key_id",",","and","it","also","supports","to","prohibit","certain","key-value","pairs","by","setting","used_ids",".","Args",":","distribution","(","str",")",":","The","string","of","distribution",",","which","is","used","for","subclass",".","Attributes",":","used_ids","(","numpy.ndarray",")",":","The","result","of",":","meth",":","`","get_used_ids","`","."]
docstr: Sampling [sample_num] item_ids.
  
  Args:
      sample_num (int): the number of samples.
  
  Returns:
      sample_list (np.array): a list of samples and the len is [sample_num].
docstr_tok: ["Sampling","[","sample_num","]","item_ids",".","Args",":","sample_num","(","int",")",":","the","number","of","samples",".","Returns",":","sample_list","(","np.array",")",":","a","list","of","samples","and","the","len","is","[","sample_num","]","."]
code: def sampling(self, sample_num):
      """Sampling [sample_num] item_ids.
  
      Args:
          sample_num (int): the number of samples.
  
      Returns:
          sample_list (np.array): a list of samples and the len is [sample_num].
      """
      if self.distribution == "uniform":
          return self._uni_sampling(sample_num)
      elif self.distribution == "popularity":
          return self._pop_sampling(sample_num)
      else:
          raise NotImplementedError(
              f"The sampling distribution [{self.distribution}] is not implemented."
          )
  
imports: import copy
  import numpy
  from numpy.random import sample
  import torch
  from collections import Counter
label_desc: Use image node_id 7 for calling the AbstractSampler obj's underlying member method code with example usage: obj.sampling(sample_num) and returns: self, self