import re


def _format_usage(prog, usage):
    """Format usage."""
    spaces = re.sub('.', ' ', 'usage: ')
    usage_elts = [prog]
    usage_elts.extend(['%s %s' % (spaces, elt) for elt in usage.split('\n')[:-1]])
    return '\n'.join(usage_elts)