Get dict of {annotated fields: annotations} by cls of
        input instance.

        :return: a set of (annotated fields, annotations).
        :rtype: dict

def get_annotated_fields(cls, instance, select=lambda *p: True):
        """Get dict of {annotated fields: annotations} by cls of
        input instance.

        :return: a set of (annotated fields, annotations).
        :rtype: dict
        """

        result = {}

        for _, member in getmembers(instance):
            try:
                annotations = cls.get_annotations(
                    target=member, ctx=instance, select=select
                )

            except TypeError:
                pass

            else:
                try:
                    if annotations:
                        result[member] = annotations

                except TypeError:  # if field is an object proxy
                    pass

        return result