def get_sources(self, limit=sys.maxsize, types_list=None):
if types_list and not isinstance(types_list, (tuple, list)):<EOL><INDENT>types_list = [types_list]<EOL><DEDENT>sources = list(self._sources)<EOL>random.shuffle(sources)<EOL>for source in sources:<EOL><INDENT>if not types_list or source[<NUM_LIT:0>] in types_list:<EOL><INDENT>limit -= <NUM_LIT:1><EOL>yield source[<NUM_LIT:0>](*source[<NUM_LIT:1>])<EOL><DEDENT>if limit <= <NUM_LIT:0>:<EOL><INDENT>break<EOL><DEDENT><DEDENT>
Generates instantiated sources from the factory
:param limit: the max number of sources to yield
:type limit: int
:param types_list: filter by types so the constructor can be used to accomidate many types
:type types_list: class or list of classes
:return: Yields types added by add_source
:rtype: generator