code: def __init__(self, X, neighbour_matrix, batch_size=32):
      if batch_size > X.shape[0]:
          raise ValueError(
              """batch_size value larger than num_rows in dataset
                               (batch_size={}, rows={}). Lower batch_size to a
                               smaller value.""".format(
                  batch_size, X.shape[0]
              )
          )
      self.X = X
      self.neighbour_matrix = neighbour_matrix
      self.batch_size = batch_size
      self.batched_data = hasattr(X, "get_batch")
      self.batched_neighbours = hasattr(neighbour_matrix, "get_batch")
      self._idx_dtype = get_uint_ctype(self.X.shape[0])
  
imports: from abc import ABC, abstractmethod
  from functools import partial
  import itertools
  import random
  import math
  import numpy
  from tensorflow.keras.utils import Sequence
  from scipy.sparse import issparse
  from ..data import get_uint_ctype
label_desc: Use image node_id 1 to create a new TripletGenerator object from inherited base classes: Sequence, ABC with example: obj = TripletGenerator(X, neighbour_matrix, batch_size)