code: def __init__(
      self, dataset, batch_size, q, chronological, negativenum
  ):
      self._dataset = dataset
      self._batch_size = batch_size
      self._q = q
      self._state = 0
      self._chronological = chronological
      self._negativenum = negativenum
  
      if not chronological:
          self._dataset.shuffle()
  
      super(_NPairwiseSampler, self).__init__()
  
file_path: openrec/openrec/tf1/legacy/utils/samplers/n_pairwise_sampler.py
imports: from __future__ import print_function
  import numpy
  import random
  from multiprocessing import Process
  from openrec.tf1.legacy.utils.samplers import Sampler
label_desc: Use image node_id 1 to create a new _NPairwiseSampler object from inherited base classes: Process with example: obj = _NPairwiseSampler(dataset, batch_size, q, chronological, negativenum)