code: def _raise_if_not_sorted_or_not_on_same_chromosome(variants):
      """Raises a ValueError if variants isn't sorted on the same chromosome."""
      if not variant_utils.variants_are_sorted(variants):
          raise ValueError("Variants must be sorted", variants)
      for v in variants[1:]:
          if variants[0].reference_name != v.reference_name:
              raise ValueError(
                  "Variants (v1={}, v2={}) not on the same chromosome".format(
                      v.reference_name, variants[0].reference_name
                  )
              )
  
imports: import collections
  import copy
  import enum
  import heapq
  import itertools
  from absl import logging
  from deepvariant.labeler import variant_labeler
  from deepvariant.protos import deepvariant_pb2
  from third_party.nucleus.io import fasta
  from third_party.nucleus.util import ranges
  from third_party.nucleus.util import variant_utils
  from third_party.nucleus.util import variantcall_utils
label_desc: Use image node_id 1 for calling a global function with example usage: _raise_if_not_sorted_or_not_on_same_chromosome(variants) without return types