code: def _invalid_frame(fobj):
      
      fin = fobj.f_code.co_filename
      invalid_module = any([fin.endswith(item) for item in _INVALID_MODULES_LIST])
      return invalid_module or (not os.path.isfile(fin))
docs: Select valid stack frame to process.