import re


def parse_example(txt):
    """
    Parse a block of text linked to a function, looking for an example.
    Return None if not example was found
    """
    res = re.findall(r'\\example\s*:\s*(\w+)', txt, re.DOTALL)
    if not res:
        return
    if len(res) > 1:
        print("warning: only zero or one examples authorized for each function")
    return res[0]