class_docstr: :class:`Sampler` is used to sample negative items for each input user. In order to avoid positive items
  in train-phase to be sampled in valid-phase, and positive items in train-phase or valid-phase to be sampled
  in test-phase, we need to input the datasets of all phases for pre-processing. And, before using this sampler,
  it is needed to call :meth:`set_phase` to get the sampler of corresponding phase.
  
  Args:
      phases (str or list of str): All the phases of input.
      datasets (Dataset or list of Dataset): All the dataset for each phase.
      distribution (str, optional): Distribution of the negative items. Defaults to 'uniform'.
  
  Attributes:
      phase (str): the phase of sampler. It will not be set until :meth:`set_phase` is called.
class_docstr_tok: [":","class",":","`","Sampler","`","is","used","to","sample","negative","items","for","each","input","user",".","In","order","to","avoid","positive","items","in","train-phase","to","be","sampled","in","valid-phase",",","and","positive","items","in","train-phase","or","valid-phase","to","be","sampled","in","test-phase",",","we","need","to","input","the","datasets","of","all","phases","for","pre-processing",".","And",",","before","using","this","sampler",",","it","is","needed","to","call",":","meth",":","`","set_phase","`","to","get","the","sampler","of","corresponding","phase",".","Args",":","phases","(","str","or","list","of","str",")",":","All","the","phases","of","input",".","datasets","(","Dataset","or","list","of","Dataset",")",":","All","the","dataset","for","each","phase",".","distribution","(","str",",","optional",")",":","Distribution","of","the","negative","items",".","Defaults","to","'uniform","'",".","Attributes",":","phase","(","str",")",":","the","phase","of","sampler",".","It","will","not","be","set","until",":","meth",":","`","set_phase","`","is","called","."]
code: def _uni_sampling(self, sample_num):
      return np.random.randint(1, self.item_num, sample_num)
  
imports: import copy
  import numpy
  from numpy.random import sample
  import torch
  from collections import Counter
label_desc: Use image node_id 3 for calling the Sampler obj's underlying member method code with example usage: obj._uni_sampling(sample_num) and returns: np