code: def get_cmd_doc(interface):
      """Return the documentation for the command defined by `interface`.
  
      Parameters
      ----------
      interface : subclass of Interface
      """
      intf_doc = (
          "" if interface.__doc__ is None else interface.__doc__.strip()
      )
      if hasattr(interface, "_docs_"):
          # expand docs
          intf_doc = intf_doc.format(**interface._docs_)
      return intf_doc
  
imports: import inspect
  import logging
  import os
  import re
  import textwrap
  import warnings
  from abc import ABC, abstractmethod
  from functools import wraps
  from importlib import import_module
  from typing import Callable, Dict, Generator, TypeVar, TYPE_CHECKING
  import datalad
  from datalad import cfg
  from datalad.core.local.resulthooks import get_jsonhooks_from_config, match_jsonhook2result, run_jsonhook
  from datalad.distribution.dataset import Dataset, resolve_path
  from datalad.interface.common_opts import eval_params
  from datalad.interface.results import known_result_xfms
  from datalad.interface.utils import get_result_filter, keep_result, render_action_summary, xfm_result, _process_results
  from datalad.support.exceptions import CapturedException, IncompleteResultsError
  from datalad.utils import get_wrapped_class
label_desc: Use image node_id 5 for calling a global function with example usage: get_cmd_doc(interface) and returns: intf_doc