code: def find_py_files(path, exclude_paths):
      """
      Find all .py files in a directory, excluding files in specified subdirectories.
  
      Parameters
      ----------
      path : str
          The base directory to search for .py files.
      exclude_paths : list of str
          A list of subdirectories to exclude from the search.
  
      Returns
      -------
      list of str
          A list of paths to .py files.
      """
      py_files = []
      for root, dirs, files in os.walk(path):
          if any(
              exclude_path in root for exclude_path in exclude_paths
          ):
              continue
          for file in files:
              if file.endswith(".py"):
                  py_files.append(os.path.join(root, file))
      return py_files
  
imports: import sys
  import os
label_desc: Use image node_id 1 for calling a global function with example usage: find_py_files(path, exclude_paths) and returns: py_files