def METHOD_NAME(self, points: int, points_by_difficulty: Dict[str, int]) -> bool:
    if not self.points.exists():
        return True
    d_points = points_by_difficulty.copy()
    ds,ls = zip(*list((p.difficulty,p.limit) for p in self.points.all()))
    for i,d in enumerate(ds): # pylint: disable=too-many-nested-blocks
        if d:
            if self.consume_harder_points:
                p = d_points.get(d, 0)
                l = ls[i] # noqa: E741
                if p < l:
                    for j in range(i + 1, len(ds)):
                        jd = ds[j]
                        jp = d_points.get(jd, 0)
                        if jp > l - p:
                            d_points[jd] -= l - p
                            d_points[d] = l
                            break
                        p += jp
                        d_points[d] = p
                        d_points[jd] = 0
                else:
                    continue
            if d_points.get(d, 0) < ls[i]:
                return False
        elif points < ls[i]:
            return False
    return True