code: def simplify_variant_alleles(variant):
      """Replaces the alleles in variants with their simplified versions.
  
      This function takes a variant and replaces its ref and alt alleles with those
      produced by a call to variant_utils.simplify_alleles() to remove common
      postfix bases in the alleles that may be present due to pruning away alleles.
  
      Args:
        variant: learning.genomics.genomics.Variant proto we want to simplify.
  
      Returns:
        variant with its ref and alt alleles replaced with their simplified
          equivalents.
      """
      simplified_alleles = simplify_alleles(
          variant.reference_bases, *variant.alternate_bases
      )
      variant.reference_bases = simplified_alleles[0]
      variant.alternate_bases[:] = simplified_alleles[1:]
      variant.end = variant.start + len(variant.reference_bases)
      return variant
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import enum
  import itertools
  import six
  from third_party.nucleus.protos import variants_pb2
  from third_party.nucleus.util import ranges
  from third_party.nucleus.util import variantcall_utils
  from third_party.nucleus.util import vcf_constants
label_desc: Use image node_id 25 for calling a global function with example usage: simplify_variant_alleles(variant) and returns: variant