code: def test_commit_granular_output_dir(tmp_dir, dvc):
      tmp_dir.gen(
          {
              "data": {
                  "foo": "foo",
                  "bar": "bar",
                  "subdir": {"subfoo": "subfoo", "subbar": "subbar"},
              }
          }
      )
      dvc.add("data", no_commit=True)
      dvc.commit("data")
      assert dvc.status() == {}
  
imports: import os
  import textwrap
  import pytest
  from dvc.dependency.base import DependencyDoesNotExistError
  from dvc.dvcfile import PROJECT_FILE
  from dvc.fs import localfs
  from dvc.output import OutputDoesNotExistError
  from dvc.stage.exceptions import StageCommitError
label_desc: Use image node_id 9 for calling a global function with example usage: test_commit_granular_output_dir(tmp_dir, dvc) without return types