code: def validate_sparse_labels(Y):
      if not zero_indexed(Y):
          raise ValueError("Ensure that your labels are zero-indexed")
      if not _consecutive_indexed(Y):
          raise ValueError(
              "Ensure that your labels are indexed consecutively"
          )
  
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 10 for calling a global function with example usage: validate_sparse_labels(Y) without return types