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: Sample [sample_num] items in the popularity-biased distribution.
  
  Args:
      sample_num (int): the number of samples.
  
  Returns:
      sample_list (np.array): a list of samples.
docstr_tok: ["Sample","[","sample_num","]","items","in","the","popularity-biased","distribution",".","Args",":","sample_num","(","int",")",":","the","number","of","samples",".","Returns",":","sample_list","(","np.array",")",":","a","list","of","samples","."]
code: def _pop_sampling(self, sample_num):
      """Sample [sample_num] items in the popularity-biased distribution.
  
      Args:
          sample_num (int): the number of samples.
  
      Returns:
          sample_list (np.array): a list of samples.
      """
  
      keys = list(self.prob.keys())
      random_index_list = np.random.randint(0, len(keys), sample_num)
      random_prob_list = np.random.random(sample_num)
      final_random_list = []
  
      for idx, prob in zip(random_index_list, random_prob_list):
          if self.prob[keys[idx]] > prob:
              final_random_list.append(keys[idx])
          else:
              final_random_list.append(self.alias[keys[idx]])
  
      return np.array(final_random_list)
  
imports: import copy
  import numpy
  from numpy.random import sample
  import torch
  from collections import Counter
label_desc: Use image node_id 6 for calling the AbstractSampler obj's underlying member method code with example usage: obj._pop_sampling(sample_num) and returns: np