code: def _describe_dataset(ds, sensitive):
      from datalad.interface.results import success_status_map
  
      try:
          infos = {
              "path": ds.path,
              "repo": ds.repo.__class__.__name__ if ds.repo else None,
              "id": ds.id,
          }
          # describe available branches and their states
          branches = [
              "%s@%s"
              % (b, next(ds.repo.get_branch_commits_(branch=b))[:7])
              for b in ds.repo.get_branches()
          ]
          infos["branches"] = branches
          return infos
      except InvalidGitRepositoryError as e:
          ce = CapturedException(e)
          return {"invalid": ce.message}
  
imports: import logging
  import os
  import os.path
  import sys
  import tempfile
  import textwrap
  from collections import defaultdict
  from functools import partial
  from datalad.dochelpers import get_docstring_split
  from datalad.interface.base import Interface, build_doc
  from datalad.utils import ensure_unicode, getpwd, unlink, Path
  from datalad.support.external_versions import external_versions
  from datalad.support.exceptions import CapturedException, CommandError, InvalidGitRepositoryError
  from datalad import __version__
label_desc: Use image node_id 13 for calling a global function with example usage: _describe_dataset(ds, sensitive) and returns: infos, dict