code: def test_ignored_dir_unignored_pattern(tmp_dir, dvc, scm):
      tmp_dir.gen({".gitignore": "data/**\n!data/**/\n!data/**/*.dvc"})
      scm.add([".gitignore"])
      (stage,) = tmp_dir.dvc_gen({"data/raw/tracked.csv": "5,6,7,8"})
      index = Index.from_repo(dvc)
      assert index.stages == [stage]
  
imports: import os
  from itertools import chain
  import pytest
  from pygtrie import Trie
  from dvc.repo.index import Index
  from dvc.stage import Stage
label_desc: Use image node_id 16 for calling a global function with example usage: test_ignored_dir_unignored_pattern(tmp_dir, dvc, scm) without return types