def _extract_from_toolkit(args):
extractor = _Extractor(args)<EOL>if extractor._cmd_args.verbose:<EOL><INDENT>print("<STR_LIT>", __version__)<EOL>print("<STR_LIT>", _topology_tk_dir())<EOL><DEDENT>tk_dir = extractor._tk_dir<EOL>tk_streams = os.path.join(tk_dir, '<STR_LIT>', '<STR_LIT>', '<STR_LIT>')<EOL>if not os.path.isdir(tk_streams) or not fnmatch.filter(os.listdir(tk_streams), '<STR_LIT>'):<EOL><INDENT>extractor._make_toolkit()<EOL>return<EOL><DEDENT>lf = os.path.join(tk_streams, '<STR_LIT>')<EOL>with  open(lf, '<STR_LIT:w>') as lfno:<EOL><INDENT>fcntl.flock(lfno, fcntl.LOCK_EX)<EOL>tk_idx = os.path.join(tk_dir, '<STR_LIT>')<EOL>tk_time = os.path.getmtime(tk_idx) if os.path.exists(tk_idx) else None<EOL>changed = False if tk_time else True<EOL>if tk_time:<EOL><INDENT>for mf in glob.glob(os.path.join(tk_streams, '<STR_LIT>')):<EOL><INDENT>if os.path.getmtime(mf) >= tk_time:<EOL><INDENT>changed = True<EOL>break<EOL><DEDENT><DEDENT><DEDENT>if changed:<EOL><INDENT>path_items = _setup_path(tk_dir, tk_streams)<EOL>for mf in glob.glob(os.path.join(tk_streams, '<STR_LIT>')):<EOL><INDENT>print('<STR_LIT>', mf, '<STR_LIT>')<EOL>name  = inspect.getmodulename(mf)<EOL>dynm = imp.load_source(name, mf)<EOL>streams_python_file = inspect.getsourcefile(dynm)<EOL>extractor._process_operators(dynm, name, streams_python_file, inspect.getmembers(dynm, inspect.isfunction))<EOL>extractor._process_operators(dynm, name, streams_python_file, inspect.getmembers(dynm, inspect.isclass))<EOL><DEDENT>langList = extractor._copy_globalization_resources()<EOL>if extractor._cmd_args.verbose:<EOL><INDENT>print("<STR_LIT>", langList)<EOL><DEDENT>extractor._setup_info_xml(langList)<EOL>extractor._make_toolkit()<EOL>_reset_path(path_items)<EOL>fcntl.flock(lfno, fcntl.LOCK_UN)<EOL><DEDENT><DEDENT>
Look at all the modules in opt/python/streams (opt/python/streams/*.py)
and extract any spl decorated function as an operator.