code: def test_get_default_title(path=None):
      repo = GitRepo(path)
      ds = Dataset(path)
      # There is no dataset initialized yet, so only path will be the title
      dirname = op.basename(path)
      eq_(_get_default_title(ds), dirname)
  
      # Initialize and get UUID
      ds.create(force=True)
      eq_(
          _get_default_title(ds), "{dirname}#{ds.id}".format(**locals())
      )
  
      # Tag and get @version
      # cannot use ds.save since our tags are not annotated,
      # see https://github.com/datalad/datalad/issues/4139
      ds.repo.tag("0.1", message="important version")
      eq_(
          _get_default_title(ds),
          "{dirname}#{ds.id}@0.1".format(**locals()),
      )
  
imports: from datalad.api import Dataset, export_archive
  from datalad.support import path
  from datalad.support.gitrepo import GitRepo
  from datalad.tests.utils_pytest import eq_, with_tree
  from ..export_to_figshare import _get_default_title
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_default_title(path) without return types