code: def test_gh1597(path=None):
      ds = Dataset(path).create()
      sub = ds.create("sub")
      res = ds.subdatasets()
      assert_result_count(res, 1, path=sub.path)
      # now modify .gitmodules with another command
      ds.subdatasets(contains=sub.path, set_property=[("this", "that")])
      # now modify low-level
      with open(op.join(ds.path, ".gitmodules"), "a") as f:
          f.write("\n")
      assert_repo_status(ds.path, modified=[".gitmodules"])
      ds.save(".gitmodules")
      # must not come under annex management
      assert_not_in(
          "key",
          ds.repo.get_content_annexinfo(
              paths=[".gitmodules"]
          ).popitem()[1],
      )
  
imports: import itertools
  import logging
  import os
  import os.path
  import pytest
  import datalad.utils
  from datalad.api import create, install, save
  from datalad.distribution.dataset import Dataset
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.exceptions import CommandError
  from datalad.tests.utils_pytest import DEFAULT_BRANCH, OBSCURE_FILENAME, SkipTest, assert_in, assert_in_results, assert_not_in, assert_raises, assert_repo_status, assert_result_count, assert_status, chpwd, create_tree, eq_, known_failure, known_failure_windows, maybe_adjust_repo, neq_, ok_, patch, skip_if_adjusted_branch, skip_wo_symlink_capability, swallow_logs, swallow_outputs, with_tempfile, with_tree
  from datalad.utils import Path, ensure_list, rmtree
label_desc: Use image node_id 15 for calling a global function with example usage: test_gh1597(path) without return types