code: def _get_default_title(dataset):
      """Create default title as dataset directory[#UUID][@version]
      with any of [] missing if not defined
      """
      from ..support.path import basename
  
      title = basename(dataset.path)
      if dataset.id:
          title += "#{dataset.id}".format(**locals())
      version = dataset.repo.describe()
      if version:
          title += "@{version}".format(**locals())
      # 3 is minimal length. Just in case there is no UUID or version and dir
      # is short
      if len(title) < 3:
          title += "0" * (3 - len(title))
      return title
  
imports: from datalad.utils import unlink
  from datalad.interface.base import Interface
  from datalad.interface.base import build_doc
  from datalad.interface.results import get_status_dict
  import logging
label_desc: Use image node_id 1 for calling a global function with example usage: _get_default_title(dataset) and returns: title