code: def test_install_recursive_with_data(src=None, path=None):
      _make_dataset_hierarchy(src)
  
      # now again; with data:
      res = install(
          path,
          source=src,
          recursive=True,
          get_data=True,
          result_filter=None,
          result_xfm=None,
      )
      assert_status("ok", res)
      # installed a dataset and two subdatasets, and one file with content in
      # each
      assert_result_count(res, 5, type="dataset", action="install")
      assert_result_count(res, 2, type="file", action="get")
      # we recurse top down during installation, so toplevel should appear at
      # first position in returned list
      eq_(res[0]["path"], path)
      top_ds = YieldDatasets()(res[0])
      ok_(top_ds.is_installed())
  
      def all_have_content(repo):
          ainfo = repo.get_content_annexinfo(
              init=None, eval_availability=True
          )
          return all(st["has_content"] for st in ainfo.values())
  
      if isinstance(top_ds.repo, AnnexRepo):
          ok_(all_have_content(top_ds.repo))
  
      for subds in top_ds.subdatasets(
          recursive=True, result_xfm="datasets"
      ):
          ok_(subds.is_installed(), "Not installed: %s" % (subds,))
          if isinstance(subds.repo, AnnexRepo):
              ok_(all_have_content(subds.repo))
  
imports: import logging
  import os
  from os.path import basename, dirname, exists, isdir
  from os.path import join
  from unittest.mock import patch
  import pytest
  from datalad import cfg
  from datalad.api import create, get, install
  from datalad.cmd import WitlessRunner
  from datalad.interface.results import YieldDatasets
  from datalad.support import path
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.exceptions import IncompleteResultsError, InsufficientArgumentsError
  from datalad.support.gitrepo import GitRepo
  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 DEFAULT_BRANCH, DEFAULT_REMOTE, assert_false, assert_in, assert_in_results, assert_is_instance, assert_not_in, assert_raises, assert_repo_status, assert_result_count, assert_status, create_tree, eq_, get_datasets_topdir, integration, known_failure_githubci_win, known_failure_windows, ok_, ok_file_has_content, ok_startswith, put_file_under_git, serve_path_via_http, skip_if_no_network, skip_if_on_windows, skip_ssh, slow, swallow_logs, use_cassette, usecase, with_tempfile, with_tree
  from datalad.utils import Path, _path_, chpwd, getpwd, on_windows, rmtree
  from ..dataset import Dataset
label_desc: Use image node_id 11 for calling a global function with example usage: test_install_recursive_with_data(src, path) and returns: all