Take the current context, and the current patch locks, and determine
        the effective requests that will be added to the main request.

        Returns:
            A dict of (PatchLock, [Requirement]) tuples. Each requirement will be
            a weak package reference. If there is no current context, an empty
            dict will be returned.

def get_lock_requests(self):
        """Take the current context, and the current patch locks, and determine
        the effective requests that will be added to the main request.

        Returns:
            A dict of (PatchLock, [Requirement]) tuples. Each requirement will be
            a weak package reference. If there is no current context, an empty
            dict will be returned.
        """
        d = defaultdict(list)
        if self._context:
            for variant in self._context.resolved_packages:
                name = variant.name
                version = variant.version
                lock = self.patch_locks.get(name)
                if lock is None:
                    lock = self.default_patch_lock

                request = get_lock_request(name, version, lock)
                if request is not None:
                    d[lock].append(request)
        return d