code: def create_get_fn(value_type, number):
      """Returns a callable that extracts the typed information from a ListValue.
  
      Args:
        value_type: str. The value type stored as defined in the VCF 4.3 spec.
        number: str. The number of entries of this value as defined in the VCF spec.
  
      Returns:
        A callable that takes two inputs: A Map(str --> ListValue) and a string
        field name and returns the associated typed value(s). The return value is
        a list of typed values or a single typed value, depending on the expected
        number of values returned.
      """
      is_single_field = number == "0" or number == "1"
      if value_type == CHARACTER_TYPE or value_type == STRING_TYPE:
          return functools.partial(
              struct_utils.get_string_field,
              is_single_field=is_single_field,
          )
      elif value_type == INTEGER_TYPE:
          return functools.partial(
              struct_utils.get_int_field,
              is_single_field=is_single_field,
          )
      elif value_type == FLOAT_TYPE:
          return functools.partial(
              struct_utils.get_number_field,
              is_single_field=is_single_field,
          )
      elif value_type == FLAG_TYPE:
          return functools.partial(
              struct_utils.get_bool_field,
              is_single_field=is_single_field,
          )
      else:
          raise ValueError("Invalid value_type: {}".format(value_type))
  
file_path: deepvariant/third_party/nucleus/util/vcf_constants.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  from third_party.nucleus.protos import variants_pb2
  from third_party.nucleus.util import struct_utils
label_desc: Use image node_id 5 for calling a global function with example usage: create_get_fn(value_type, number) and returns: functools, functools, functools, functools