code: def ploidy(variant_call):
      """Returns the ploidy of the VariantCall.
  
      Args:
        variant_call: VariantCall proto. The VariantCall to evaluate.
  
      Returns:
        The ploidy of the call (a non-negative integer).
      """
      # Unknown genotypes are represented as -1 in VariantCall protos. When
      # a VCF is parsed that contains multiple ploidies in different samples,
      # a separate padding value of -2**30 - 1 is inserted into the calls.
      return sum(gt >= -1 for gt in variant_call.genotype)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from third_party.nucleus.protos import struct_pb2
  from third_party.nucleus.protos import variants_pb2
  from third_party.nucleus.util import struct_utils
  from third_party.nucleus.util import vcf_constants
label_desc: Use image node_id 18 for calling a global function with example usage: ploidy(variant_call) and returns: sum