code: def find_py_files(srctree, ignore=None):
          
  
          if not os.path.isdir(srctree):
              yield os.path.split(srctree)
          for srcpath, _, fnames in os.walk(srctree):
              # Avoid infinite recursion for silly users
              if ignore is not None and ignore in srcpath:
                  continue
              for fname in (x for x in fnames if x.endswith('.py')):
                  yield srcpath, fname
docs: Return all the python files in a source tree
  
          Ignores any path that contains the ignore string
  
          This is not used by other class methods, but is
          designed to be used in code that uses this class.