code: def _allele_from_index(variant, allele_index):
      """Gets the reference_bases or alternative_bases for allele_index."""
      if allele_index == 0:
          return variant.reference_bases
      else:
          return variant.alternate_bases[allele_index - 1]
  
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 18 for calling a global function with example usage: _allele_from_index(variant, allele_index) and returns: variant, variant