docstr: Gets one batch of triplets
docstr_tok: ["Gets","one","batch","of","triplets"]
code: def __getitem__(self, idx):
      """Gets one batch of triplets"""
      batch_indices = range(
          idx * self.batch_size,
          min((idx + 1) * self.batch_size, self.X.shape[0]),
      )
      # indices shape: (3, batch_size)
      triplet_indices = self.get_triplet_indices(batch_indices)
      label_batch = self.get_labels(batch_indices)
  
      # Retrieve actual data using triplet_indices
      # triplet_batch shape: (3, batch_size, *X.shape[1:])
      triplet_batch = self.get_triplet_data(triplet_indices)
  
      return self.output_triplets(triplet_batch, label_batch)
  
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 3 for calling the TripletGenerator obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: self