code: def _consecutive_indexed(Y):
      """Assumes that Y is zero-indexed."""
      n_classes = len(np.unique(Y[Y != np.array(-1)]))
      if max(Y) >= n_classes:
          return False
      return True
  
imports: import functools
  from tensorflow.keras import backend
  import tensorflow
  from tensorflow import keras
  import numpy
  from .distances import euclidean_distance, manhattan_distance, chebyshev_distance, cosine_distance
label_desc: Use image node_id 12 for calling a global function with example usage: _consecutive_indexed(Y) and returns: True, False