def get_annotation_namespace(annotation):
    """
    Utility function to extract the namespace from a payload annotation (e.g. @Message.ExtendedInfo)
    :param annotation: the payload annotation
    :type annotation: str
    :return: the namespace
    """
    if '@' in annotation:
        annotation = annotation.rsplit('@', 1)[1]
    return annotation.rsplit('.', 1)[0]