code: def walk(path: Path, include: Optional[str] = None) -> Iterator[Path]:
      """Yeilds all files, iterating over directory
  
      Parameters
      ----------
      path: Path
          The root path to walk from
  
      include: Optional[str] = None
          Include only directories which match this string
  
      Returns
      -------
      Iterator[Path]
          All file paths that could be found from this walk
      """
      for p in path.iterdir():
          if p.is_dir():
              if include is None or re.match(include, p.name):
                  yield from walk(p, include)
          else:
              yield p.resolve()
  
file_path: auto-sklearn/test/conftest.py
imports: from typing import Any, Iterator, List, Optional
  import re
  import shutil
  import signal
  from pathlib import Path
  import psutil
  import pytest
  from pytest import ExitCode, Item, Session
label_desc: Use image node_id 1 for calling a global function with example usage: walk(path, include) without return types