code: def _extend_command_by_args_dict(command, extra_args):
      """Adds `extra_args` to the command string."""
      for key in sorted(extra_args):
          value = extra_args[key]
          if value is None:
              continue
          if isinstance(value, bool):
              added_arg = "" if value else "no"
              added_arg += key
              command.extend(["--" + added_arg])
          else:
              command.extend(["--" + key, _add_quotes(value)])
      return 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 13 for calling a global function with example usage: _extend_command_by_args_dict(command, extra_args) and returns: command