def METHOD_NAME(self, restrict, sorter=iter, pkg_cls=InjectedPkg):
    if isinstance(restrict, atom.atom):
        func = restrict.intersects
    else:
        func = restrict.match
    # yield any matching pkgs already injected into the repo
    for pkg in self._injected_pkgs:
        if func(pkg._raw_pkg):
            yield pkg
    # inject/yield any matching atoms into the repo that aren't blockers
    if self._restrictions and isinstance(restrict, atom.atom):
        if self.restriction.match(restrict) and not restrict.blocks:
            p = pkg_cls(restrict, self)
            self._injected_pkgs[p] = None
            yield p