code: def make_examples_command(
      ref,
      reads,
      examples,
      extra_args,
      runtime_by_region_path=None,
      **kwargs,
  ):
      """Returns a make_examples (command, logfile) for subprocess.
  
      Args:
        ref: Input FASTA file.
        reads: Input BAM file.
        examples: Output tfrecord file containing tensorflow.Example files.
        extra_args: Comma-separated list of flag_name=flag_value.
        runtime_by_region_path: Output path for runtime by region metrics.
        **kwargs: Additional arguments to pass in for make_examples.
  
      Returns:
        (string, string) A command to run, and a log file to output to.
      """
      command = [
          "time",
          "seq 0 {} |".format(_NUM_SHARDS.value - 1),
          "parallel -q --halt 2 --line-buffer",
          "/opt/deepvariant/bin/make_examples",
      ]
      command.extend(["--mode", "calling"])
      command.extend(["--ref", '"{}"'.format(ref)])
      command.extend(["--reads", '"{}"'.format(reads)])
      command.extend(["--examples", '"{}"'.format(examples)])
  
      if runtime_by_region_path is not None:
          command.extend(
              [
                  "--runtime_by_region",
                  '"{}"'.format(runtime_by_region_path),
              ]
          )
  
      if _MODEL_TYPE.value == "WGS" or _MODEL_TYPE.value == "WES":
          special_args = {}
          special_args["channels"] = "insert_size"
          kwargs = _update_kwargs_with_warning(kwargs, special_args)
      elif _MODEL_TYPE.value == "PACBIO":
          special_args = {}
          special_args["add_hp_channel"] = True
          special_args["alt_aligned_pileup"] = "diff_channels"
          special_args["max_reads_per_partition"] = 600
          special_args["min_mapping_quality"] = 1
          special_args["parse_sam_aux_fields"] = True
          special_args["partition_size"] = 25000
          special_args["phase_reads"] = True
          special_args["pileup_image_width"] = 199
          special_args["realign_reads"] = False
          special_args["sort_by_haplotypes"] = True
          special_args["track_ref_reads"] = True
          special_args["vsc_min_fraction_indels"] = 0.12
          kwargs = _update_kwargs_with_warning(kwargs, special_args)
      elif _MODEL_TYPE.value == "ONT_R104":
          special_args = {}
          special_args["add_hp_channel"] = True
          special_args["alt_aligned_pileup"] = "diff_channels"
          special_args["max_reads_per_partition"] = 600
          special_args["min_mapping_quality"] = 5
          special_args["parse_sam_aux_fields"] = True
          special_args["partition_size"] = 25000
          special_args["phase_reads"] = True
          special_args["pileup_image_width"] = 199
          special_args["realign_reads"] = False
          special_args["sort_by_haplotypes"] = True
          special_args["track_ref_reads"] = True
          special_args["vsc_min_fraction_snps"] = 0.08
          special_args["vsc_min_fraction_indels"] = 0.12
          kwargs = _update_kwargs_with_warning(kwargs, special_args)
      # Extend the command with all items in kwargs and extra_args.
      kwargs = _update_kwargs_with_warning(
          kwargs, _extra_args_to_dict(extra_args)
      )
      command = _extend_command_by_args_dict(command, kwargs)
  
      command.extend(["--task {}"])
      logfile = None
      if _LOGGING_DIR.value:
          logfile = "{}/make_examples.log".format(_LOGGING_DIR.value)
      return (" ".join(command), logfile)
  
imports: import os
  import subprocess
  import sys
  import tempfile
  from typing import Any, Dict, Optional, Tuple
  from absl import app
  from absl import flags
  from absl import logging
  import tensorflow
label_desc: Use image node_id 7 for calling a global function with example usage: make_examples_command(ref, reads, examples, extra_args, runtime_by_region_path) and returns: str,  logfile