def printable_usage(doc):
    usage_pattern = re.compile(r'(usage:)', re.IGNORECASE)
    usage_split = re.split(usage_pattern, doc)
    if len(usage_split) < 3:
        raise DocoptLanguageError('"usage:" (case-insensitive) not found.')
    if len(usage_split) > 3:
        raise DocoptLanguageError('More than one "usage:" (case-insensitive).')
    return re.split(r'\n\s*\n', ''.join(usage_split[1:]))[0].strip()
dataset/ETHPy150Open benoitc/gaffer/gaffer/docopt.py/printable_usage/original