code: def find_python_files_in_tree(file_path):
      if not os.path.isdir(file_path):
          yield file_path
          return
      for root, dirnames, filenames in os.walk(file_path):
          if "chardet" in root:
              # Stuff like chardet/langcyrillicmodel.py is just very slow to
              # parse and machine generated, so ignore those.
              continue
  
          for name in filenames:
              if name.endswith(".py"):
                  yield os.path.join(root, name)
  
imports: from __future__ import print_function
  import logging
  import sys
  import os
  import random
  import pickle
  import parso
  from parso.utils import split_lines
  from test.test_diff_parser import _check_error_leaves_nodes
label_desc: Use image node_id 1 for calling a global function with example usage: find_python_files_in_tree(file_path) without return types