code: def find_(
      root: str,
      rbase: str,
      include_files: List[str],
      include_dirs: List[str],
      excludes: List[str],
      scan_exclude: List[str],
  ) -> List[str]:
      files = []
      scan_root = os.path.join(root, rbase)
      with os.scandir(scan_root) as it:
          for entry in it:
              path = os.path.join(rbase, entry.name)
              if matches(scan_exclude, path):
                  continue
  
              if entry.is_dir():
                  if matches(include_dirs, path):
                      if not matches(excludes, path):
                          files.append(path)
                  else:
                      ret = find_(
                          root=root,
                          rbase=path,
                          include_files=include_files,
                          include_dirs=include_dirs,
                          excludes=excludes,
                          scan_exclude=scan_exclude,
                      )
                      files.extend(ret)
              else:
                  if matches(include_files, path) and not matches(
                      excludes, path
                  ):
                      files.append(path)
  
      return files
  
imports: import codecs
  import errno
  import logging
  import os
  import re
  import shutil
  import subprocess
  from os.path import abspath, basename, dirname, exists, isdir, join
  from typing import List, Optional
  from setuptools import Command
  from setuptools.command import build_py, develop, sdist
label_desc: Use image node_id 3 for calling a global function with example usage: find_(root, rbase, include_files, include_dirs, excludes, scan_exclude) and returns: files