code: def genotype_type(variant):
      """Gets the GenotypeType for variant.
  
      If variant doesn't have genotypes, returns no_call. Otherwise
      returns one of no_call, hom_ref, het, or hom_var depending on the
      status of the genotypes in the call field of variant.
  
      Args:
        variant: nucleus.genomics.v1.Variant.
  
      Returns:
        A GenotypeType.
  
      Raises:
        ValueError: If variant has more than one call (i.e., is multi-sample).
      """
      if not has_calls(variant):
          return GenotypeType.no_call
      elif len(variant.calls) > 1:
          raise ValueError(
              "Unsupported: multiple genotypes found at", variant
          )
      else:
          gt = set(only_call(variant).genotype)
          if gt == {-1}:
              return GenotypeType.no_call
          elif gt == {0}:
              return GenotypeType.hom_ref
          elif len(gt) > 1:
              return GenotypeType.het
          else:
              return GenotypeType.hom_var
  
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 29 for calling a global function with example usage: genotype_type(variant) and returns: GenotypeType, GenotypeType, GenotypeType, GenotypeType, GenotypeType