docstr: Slower, generic way of generating triplet indices that works on
  sequences, not just numpy arrays.
docstr_tok: ["Slower",",","generic","way","of","generating","triplet","indices","that","works","on","sequences",",","not","just","numpy","arrays","."]
code: def get_triplet_indices_generic(
      self, anchor_indices, neighbour_cands=None
  ):
      """Slower, generic way of generating triplet indices that works on
      sequences, not just numpy arrays."""
      if neighbour_cands is None:
          neighbour_cands = self.get_all_neighbour_indices(
              anchor_indices
          )
  
      neighbour_indices = list(map(random.choice, neighbour_cands))
      negative_indices = self.gen_negative_indices_generic(
          neighbour_cands
      )
      return (anchor_indices, neighbour_indices, negative_indices)
  
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 8 for calling the TripletGenerator obj's underlying member method code with example usage: obj.get_triplet_indices_generic(anchor_indices, neighbour_cands) and returns: anchor_indices,  neighbour_indices,  negative_indices