code: def test_annexinfo_init(path=None):
      ds = Dataset(path).create()
      foo = ds.pathobj / "foo"
      foo_cont = b"foo content"
      foo.write_bytes(foo_cont)
      bar = ds.pathobj / "bar"
      bar.write_text("bar content")
      ds.save()
  
      # Custom init limits report, with original dict getting updated.
      cinfo_custom_init = ds.repo.get_content_annexinfo(
          init={
              foo: {"bytesize": 0, "this-is-surely-only-here": "right?"}
          }
      )
      assert_not_in(bar, cinfo_custom_init)
      assert_in(foo, cinfo_custom_init)
      assert_equal(cinfo_custom_init[foo]["bytesize"], len(foo_cont))
      assert_equal(
          cinfo_custom_init[foo]["this-is-surely-only-here"], "right?"
      )
  
      # "git" injects get_content_info() values.
      cinfo_init_git = ds.repo.get_content_annexinfo(init="git")
      assert_in("gitshasum", cinfo_init_git[foo])
  
      # init=None, on the other hand, does not.
      cinfo_init_none = ds.repo.get_content_annexinfo(init=None)
      assert_in(foo, cinfo_init_none)
      assert_in(bar, cinfo_init_none)
      assert_not_in("gitshasum", cinfo_init_none[foo])
  
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 5 for calling a global function with example usage: test_annexinfo_init(path) without return types