def get_annotations_json(self):
        """Format the annotations properly.

        :rtype: Optional[dict[str,dict[str,bool]]
        """
        annotations = defaultdict(dict)

        for entry in self.annotations:
            annotations[entry.namespace.keyword][entry.name] = True

        return dict(annotations) or None
def get_annotations_json ( self ) : annotations = defaultdict ( dict ) for entry in self . annotations : annotations [ entry . namespace . keyword ] [ entry . name ] = True return dict ( annotations ) or None
Format the annotations properly.

        :rtype: Optional[dict[str,dict[str,bool]]