code: def _get_proc_config(name, ds=None):
      """get configuration of named procedure
  
      Figures call format string and help message for a given procedure name,
      based on dataset.
  
      Returns
      -------
      tuple
        (call format string, help string) or possibly None for either value,
        if there's nothing configured
      """
      # figure what ConfigManager to ask
      cm = cfg if ds is None else ds.config
      # ConfigManager may not be up-to-date, particularly if we are in a
      # subdataset due to recursion in `_get_procedure_implementation` where
      # outside caller operates (and reloads) on superdataset only. With
      # force=False, this shouldn't be expensive.
      cm.reload()
      # ConfigManager might return a tuple for different reasons.
      # The config might have been defined multiple times in the same location
      # (within .datalad/config for example) or there are multiple values for
      # it on different levels of git-config (system, user, repo). git-config
      # in turn does report such things ordered from most general to most
      # specific configuration. We do want the most specific one here, so
      # config.get(), which returns the last entry, works here.
      # TODO: At this point we cannot determine whether it was actually
      # configured to yield several values by the very same config, in which
      # case we should actually issue a warning, since we then have no idea
      # of a priority. But ConfigManager isn't able yet to tell us or to
      # restrict the possibility to define multiple values to particular items
      v = cm.get("datalad.procedures.{}.call-format".format(name), None)
      h = cm.get("datalad.procedures.{}.help".format(name), None)
      return v, h
  
imports: import logging
  import os
  import os.path
  import stat
  import sys
  from argparse import REMAINDER
  from glob import iglob
  import datalad.support.ansi_colors
  from datalad import cfg
  from datalad.core.local.run import Run
  from datalad.distribution.dataset import Dataset, EnsureDataset, datasetmethod, require_dataset
  from datalad.interface.base import Interface, build_doc, eval_results
  from datalad.interface.results import get_status_dict
  from datalad.support.constraints import EnsureNone
  from datalad.support.exceptions import InsufficientArgumentsError, NoDatasetFound
  from datalad.support.param import Parameter
  from datalad.utils import ensure_list, guard_for_format, join_cmdline, quote_cmdlinearg, split_cmdline
label_desc: Use image node_id 2 for calling a global function with example usage: _get_proc_config(name, ds) and returns: v,  h