code: def format_command(command, **kwds):
      """Plug in placeholders in `command`.
  
      Parameters
      ----------
      dset : Dataset
      command : str or list
  
      `kwds` is passed to the `format` call.
  
      Returns
      -------
      formatted command (str)
      """
      command = normalize_command(command)
      sfmt = SequenceFormatter()
      return sfmt.format(command, **kwds)
  
imports: import inspect
  import logging
  import os.path
  import sys
  from typing import Union
  from argparse import REMAINDER
  from itertools import chain
  from tempfile import mkdtemp
  from datalad.cmd import NoCapture, StdOutErrCapture
  from datalad.core.local.run import normalize_command
  from datalad.distribution.dataset import Dataset, EnsureDataset, datasetmethod, require_dataset
  from datalad.interface.base import Interface, build_doc, eval_results
  from datalad.interface.common_opts import contains, dataset_state, jobs_opt, recursion_flag, recursion_limit
  from datalad.interface.results import get_status_dict
  from datalad.support.constraints import EnsureBool, EnsureChoice, EnsureNone
  from datalad.support.exceptions import InsufficientArgumentsError
  from datalad.support.parallel import ProducerConsumer, ProducerConsumerProgressLog, no_parentds_in_futures, no_subds_in_futures
  from datalad.support.param import Parameter
  from datalad.utils import SequenceFormatter, chpwd, getpwd, nothing_cm, shortened_repr, swallow_outputs
label_desc: Use image node_id 1 for calling a global function with example usage: format_command(command) and returns: sfmt