docstr: Slower, generic way of generating negative indices that works on
  sequences, not just numpy arrays.
docstr_tok: ["Slower",",","generic","way","of","generating","negative","indices","that","works","on","sequences",",","not","just","numpy","arrays","."]
code: def gen_negative_indices_generic(self, neighbour_map):
      """Slower, generic way of generating negative indices that works on
      sequences, not just numpy arrays."""
      cands = [
          random.randrange(0, self.X.shape[0])
          for _ in range(len(neighbour_map))
      ]
      for i in range(len(cands)):
          while cands[i] in neighbour_map[i]:
              cands[i] = random.randrange(0, self.X.shape[0])
      return cands
  
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 9 for calling the TripletGenerator obj's underlying member method code with example usage: obj.gen_negative_indices_generic(neighbour_map) and returns: cands