@_call_aside<EOL>def _initialize_master_working_set():
working_set = WorkingSet._build_master()<EOL>_declare_state('<STR_LIT:object>', working_set=working_set)<EOL>require = working_set.require<EOL>iter_entry_points = working_set.iter_entry_points<EOL>add_activation_listener = working_set.subscribe<EOL>run_script = working_set.run_script<EOL>run_main = run_script<EOL>tuple(<EOL>dist.activate(replace=False)<EOL>for dist in working_set<EOL>)<EOL>add_activation_listener(<EOL>lambda dist: dist.activate(replace=True),<EOL>existing=False,<EOL>)<EOL>working_set.entries = []<EOL>list(map(working_set.add_entry, sys.path))<EOL>globals().update(locals())<EOL>
Prepare the master working set and make the ``require()``
API available.

This function has explicit effects on the global state
of pkg_resources. It is intended to be invoked once at
the initialization of this module.

Invocation by other packages is unsupported and done
at their own risk.