code: def test_diff_fr_none_one_get_content_annexinfo_call(path=None):
      from datalad.support.annexrepo import AnnexRepo
  
      ds = Dataset(path).create()
      (ds.pathobj / "foo").write_text("foo")
      ds.save()
      # get_content_annexinfo() is expensive.  If fr=None, we should
      # only need to call it once.
      with patch.object(AnnexRepo, "get_content_annexinfo") as gca:
          res = ds.diff(
              fr=None,
              to="HEAD",
              annex="all",
              result_renderer="disabled",
          )
          eq_(gca.call_count, 1)
  
imports: import os
  import os.path
  from unittest.mock import patch
  import datalad.utils
  from datalad.api import create, diff, save
  from datalad.cmd import GitWitlessRunner, StdOutCapture
  from datalad.consts import PRE_INIT_COMMIT_SHA
  from datalad.distribution.dataset import Dataset
  from datalad.support.exceptions import NoDatasetFound
  from datalad.tests.utils_pytest import DEFAULT_BRANCH, OBSCURE_FILENAME, SkipTest, assert_in, assert_raises, assert_repo_status, assert_result_count, assert_status, chpwd, create_tree, eq_, get_deeply_nested_structure, has_symlink_capability, known_failure_githubci_win, neq_, ok_, with_tempfile
  from datalad.utils import Path
label_desc: Use image node_id 11 for calling a global function with example usage: test_diff_fr_none_one_get_content_annexinfo_call(path) without return types