code: def variant_type(variant):
      """Gets the VariantType of variant.
  
      Args:
        variant: nucleus.genomics.v1.Variant.
  
      Returns:
        VariantType indicating the type of this variant.
      """
      if is_ref(variant):
          return VariantType.ref
      elif is_snp(variant):
          return VariantType.snp
      else:
          return VariantType.indel
  
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 17 for calling a global function with example usage: variant_type(variant) and returns: VariantType, VariantType, VariantType