code: def test_compare_content_info(path=None):
      # TODO remove when `create` is RF to return the new Dataset
      ds = Dataset(path).create()
      assert_repo_status(path)
  
      # for a clean repo HEAD and worktree query should yield identical results
      # minus a 'bytesize' report that is readily available for HEAD, but would
      # not a stat call per file for the worktree, and is not done ATM
      wt = ds.repo.get_content_info(ref=None)
      assert_dict_equal(
          wt,
          {
              f: {k: v for k, v in p.items() if k != "bytesize"}
              for f, p in ds.repo.get_content_info(ref="HEAD").items()
          },
      )
  
file_path: datalad/datalad/support/tests/test_fileinfo.py
imports: import os.path
  from pathlib import Path
  import datalad.utils
  from datalad.distribution.dataset import Dataset
  from datalad.support.exceptions import NoSuchPathError
  from datalad.support.gitrepo import GitRepo
  from datalad.tests.utils_pytest import assert_dict_equal, assert_equal, assert_false, assert_in, assert_not_in, assert_raises, assert_repo_status, get_annexstatus, get_convoluted_situation, known_failure_githubci_win, on_nfs, on_travis, slow, skip_if, with_tempfile, with_tree
label_desc: Use image node_id 2 for calling a global function with example usage: test_compare_content_info(path) without return types