code: def postprocess_variants_command(
      ref,
      infile,
      outfile,
      sample,
      extra_args,
      nonvariant_site_tfrecord_path=None,
      gvcf_outfile=None,
  ):
      """Returns a postprocess_variants command for subprocess.check_call."""
      command = ["time", "/opt/deepvariant/bin/postprocess_variants"]
      command.extend(["--ref", '"{}"'.format(ref)])
      command.extend(["--infile", '"{}"'.format(infile)])
      command.extend(["--outfile", '"{}"'.format(outfile)])
      command.extend(["--cpus 0"])
      if nonvariant_site_tfrecord_path is not None:
          command.extend(
              [
                  "--nonvariant_site_tfrecord_path",
                  '"{}"'.format(nonvariant_site_tfrecord_path),
              ]
          )
      if gvcf_outfile is not None:
          command.extend(
              ["--gvcf_outfile", '"{}"'.format(gvcf_outfile)]
          )
      # Extend the command with all items in extra_args.
      command = _extend_command_by_args_dict(
          command, _extra_args_to_dict(extra_args)
      )
      if _LOGGING_DIR.value:
          command.extend(
              [
                  "2>&1 | tee {}/postprocess_variants_{}.log".format(
                      _LOGGING_DIR.value, sample
                  )
              ]
          )
  
      return " ".join(command)
  
imports: import enum
  import os
  import subprocess
  import sys
  import tempfile
  from typing import List, Optional
  from absl import app
  from absl import flags
  from absl import logging
  import tensorflow
label_desc: Use image node_id 17 for calling a global function with example usage: postprocess_variants_command(ref, infile, outfile, sample, extra_args, nonvariant_site_tfrecord_path, gvcf_outfile) and returns: str