code: def test_get_mixed_hierarchy(src=None, path=None):
      origin = Dataset(src).create(annex=False)
      origin_sub = origin.create("subds")
      with open(opj(origin.path, "file_in_git.txt"), "w") as f:
          f.write("no idea")
      with open(opj(origin_sub.path, "file_in_annex.txt"), "w") as f:
          f.write("content")
      origin.save("file_in_git.txt", to_git=True)
      origin_sub.save("file_in_annex.txt")
      origin.save()
  
      # now, install that thing:
      ds, subds = install(
          path,
          source=src,
          recursive=True,
          result_xfm="datasets",
          return_type="item-or-list",
          result_filter=None,
      )
      ok_(subds.repo.file_has_content("file_in_annex.txt") is False)
  
      # and get:
      result = ds.get(curdir, recursive=True)
      # git repo and subds
      assert_status(["ok", "notneeded"], result)
      assert_result_count(
          result,
          1,
          path=opj(subds.path, "file_in_annex.txt"),
          status="ok",
      )
      ok_(subds.repo.file_has_content("file_in_annex.txt") is True)
  
imports: from os import curdir
  from os.path import basename
  from os.path import join
  from unittest.mock import patch
  import pytest
  from datalad.api import clone, create, get, install
  from datalad.distribution.get import _get_flexible_source_candidates_for_submodule
  from datalad.interface.results import only_matching_paths
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.exceptions import InsufficientArgumentsError, RemoteNotAvailableError
  from datalad.support.network import get_local_file_url
  from datalad.tests.utils_testdatasets import _make_dataset_hierarchy, _mk_submodule_annex
  from datalad.tests.utils_pytest import create_tree, assert_false, assert_raises, assert_in, assert_status, assert_in_results, assert_not_in_results, assert_repo_status, assert_result_count, assert_message, DEFAULT_REMOTE, eq_, known_failure_windows, known_failure_githubci_win, ok_, serve_path_via_http, skip_if_adjusted_branch, skip_ssh, skip_if_on_windows, slow, with_tempfile, with_tree
  from datalad.utils import Path, chpwd, rmtree, with_pathsep
  from ..dataset import Dataset
label_desc: Use image node_id 10 for calling a global function with example usage: test_get_mixed_hierarchy(src, path) without return types