def get_context(self, name: str, value: Any, attrs) -> Dict[str, Any]:
        """
        Adds extra information to the payload provided to the widget's template.

        Specifically:
        - Query a list if "recently used" tags (max 256 to not cause
          DoS issues) from the database to be used for auto-completion. ("most")
        - Query a smaller list of 5 tags to be made available from a quick
          selection widget ("quick").
        """
        most_tags = models.Tag.objects.order_by("-last_used").all()[:256]

        result = super().get_context(name, value, attrs)

        tag_names = set(
            x["name"] for x in (result.get("widget", {}).get("value", None) or [])
        )
        quick_suggestion_tags = [t for t in most_tags if t.name not in tag_names][:5]

        result["widget"]["tag_suggestions"] = {
            "quick": [
                self.__unpack_tag(t)
                for t in quick_suggestion_tags
                if t.name not in tag_names
            ],
            "most": [self.__unpack_tag(t) for t in most_tags],
        }
        return result

        Adds extra information to the payload provided to the widget's template.

        Specifically:
        - Query a list if "recently used" tags (max 256 to not cause
          DoS issues) from the database to be used for auto-completion. ("most")
        - Query a smaller list of 5 tags to be made available from a quick
          selection widget ("quick").
        
core/widgets.py