code: def make_example(
      variant,
      alt_alleles,
      encoded_image,
      shape,
      second_image=None,
      sequencing_type=0,
  ):
      """Creates a new tf.Example suitable for use with DeepVariant.
  
      Args:
        variant: third_party.nucleus.protos.Variant protobuf containing information
          about a candidate variant call.
        alt_alleles: A set of strings. Indicates the alternate alleles used as "alt"
          when constructing the image.
        encoded_image: a Tensor of type tf.string. Should contain an image encoding
          the reference and read data supporting variant. The encoding should be
          consistent with the image_format argument.
        shape: a list of (width, height, channel).
        second_image: a Tensor of type tf.string or None. Contains second image that
          encodes read data from another DNA sample. Must satisfy the same
          requirements as encoded_image.
        sequencing_type: int. The sequencing type of the input image.
  
      Returns:
        A tf.Example proto containing the standard DeepVariant features.
      """
      example = example_pb2.Example()
      features = example.features
      features.feature["locus"].bytes_list.value.append(
          ranges.to_literal(
              ranges.make_range(
                  variant.reference_name, variant.start, variant.end
              )
          ).encode("latin-1")
      )
      dv_utils.example_set_variant(example, variant)
      variant_type = encoded_variant_type(variant).value
      features.feature["variant_type"].int64_list.value.append(
          variant_type
      )
      all_alts = list(variant.alternate_bases)
      alt_indices = sorted(all_alts.index(alt) for alt in alt_alleles)
  
      features.feature[
          "alt_allele_indices/encoded"
      ].bytes_list.value.append(
          deepvariant_pb2.CallVariantsOutput.AltAlleleIndices(
              indices=alt_indices
          ).SerializeToString()
      )
  
      features.feature["image/encoded"].bytes_list.value.append(
          encoded_image
      )
      features.feature["image/shape"].int64_list.value.extend(shape)
      if second_image is not None:
          features.feature[
              "second_image/encoded"
          ].bytes_list.value.append(second_image.encode("latin-1"))
          features.feature[
              "second_image/shape"
          ].int64_list.value.extend(shape)
      features.feature["sequencing_type"].int64_list.value.append(
          sequencing_type
      )
      return example
  
file_path: deepvariant/deepvariant/dv_utils_using_clif.py
imports: import enum
  from deepvariant import dv_utils
  from deepvariant.protos import deepvariant_pb2
  from third_party.nucleus.util import ranges
  from third_party.nucleus.util import variant_utils
  from tensorflow.core.example import example_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: make_example(variant, alt_alleles, encoded_image, shape, second_image, sequencing_type) and returns: example