code: def test_UnsupervisedTripletGenerator():
      neighbour_list = np.load("tests/data/test_knn_k3.npy")
  
      iris = datasets.load_iris()
      X = iris.data
      batch_size = 32
  
      data_generator = UnsupervisedTripletGenerator(
          X, neighbour_list, batch_size=batch_size
      )
  
      # Run generator thorugh one iteration of dataset and into the next
      for i in range((X.shape[0] // batch_size) + 1):
          batch = data_generator.__getitem__(i)
  
          # Check that everything is the expected shape
          assert isinstance(batch, tuple)
          assert len(batch) == 2
  
          assert len(batch[0]) == 3
          assert len(batch[1]) <= batch_size
          assert batch[0][0].shape[-1] == X.shape[-1]
  
imports: import numpy
  import pytest
  from sklearn import datasets
  from ivis.data.generators import generator_from_neighbour_matrix
  from ivis.data.generators import UnsupervisedTripletGenerator
label_desc: Use image node_id 1 for calling a global function with example usage: test_UnsupervisedTripletGenerator() without return types