@classmethod
def _ap_find_potential_factories_in_module(cls, module):
    """
        Given a module that we're supposed to examine, iterate over
        the types that could be factories.

        This includes only types defined in that module. Any given
        type will only be returned once.
        """
    seen = set()
    for v in vars(module).values():
        if getattr(v, '__module__', None) != module.__name__ or not issubclass(
            type(v), type) or v in seen:
            continue
        seen.add(v)
        yield v
