def f_annotation_filter(annotations, type_uri, number):
filtered = [<EOL>annotation<EOL>for annotation in annotations<EOL>if annotation.type_uri == type_uri<EOL>]<EOL>number = min([len(filtered), number])<EOL>if number == <NUM_LIT:0>:<EOL><INDENT>return None<EOL><DEDENT>else:<EOL><INDENT>return filtered[number-<NUM_LIT:1>]<EOL><DEDENT>
Annotation filtering filter

    :param annotations: List of annotations
    :type annotations: [AnnotationResource]
    :param type_uri: URI Type on which to filter
    :type type_uri: str
    :param number: Number of the annotation to return
    :type number: int
    :return: Annotation(s) matching the request
    :rtype: [AnnotationResource] or AnnotationResource