def get_used_entities(self,use_specs):
if len(use_specs.strip()) == <NUM_LIT:0>:<EOL><INDENT>return (self.pub_procs, self.pub_absints, self.pub_types, self.pub_vars)<EOL><DEDENT>only = bool(self.ONLY_RE.match(use_specs))<EOL>use_specs = self.ONLY_RE.sub('<STR_LIT>',use_specs)<EOL>ulist = self.SPLIT_RE.split(use_specs)<EOL>ulist[-<NUM_LIT:1>] = ulist[-<NUM_LIT:1>].strip()<EOL>uspecs = {}<EOL>for item in ulist:<EOL><INDENT>match = self.RENAME_RE.search(item)<EOL>if match:<EOL><INDENT>uspecs[match.group(<NUM_LIT:1>).lower()] = match.group(<NUM_LIT:2>)<EOL><DEDENT>else:<EOL><INDENT>uspecs[item.lower()] = item<EOL><DEDENT><DEDENT>ret_procs = {}<EOL>ret_absints = {}<EOL>ret_types = {}<EOL>ret_vars = {}<EOL>for name, obj in self.pub_procs.items():<EOL><INDENT>name = name.lower()<EOL>if only:<EOL><INDENT>if name in uspecs:<EOL><INDENT>ret_procs[name] = obj<EOL><DEDENT><DEDENT>else:<EOL><INDENT>ret_procs[name] = obj<EOL><DEDENT><DEDENT>for name, obj in self.pub_absints.items():<EOL><INDENT>name = name.lower()<EOL>if only:<EOL><INDENT>if name in uspecs:<EOL><INDENT>ret_absints[name] = obj<EOL><DEDENT><DEDENT>else:<EOL><INDENT>ret_absints[name] = obj<EOL><DEDENT><DEDENT>for name, obj in self.pub_types.items():<EOL><INDENT>name = name.lower()<EOL>if only:<EOL><INDENT>if name in uspecs:<EOL><INDENT>ret_types[name] = obj<EOL><DEDENT><DEDENT>else:<EOL><INDENT>ret_types[name] = obj<EOL><DEDENT><DEDENT>for name, obj in self.pub_vars.items():<EOL><INDENT>name = name.lower()<EOL>if only:<EOL><INDENT>if name in uspecs:<EOL><INDENT>ret_vars[name] = obj<EOL><DEDENT><DEDENT>else:<EOL><INDENT>ret_vars[name] = obj<EOL><DEDENT><DEDENT>return (ret_procs,ret_absints,ret_types,ret_vars)<EOL>
Returns the entities which are imported by a use statement. These
are contained in dicts.