def METHOD_NAME(docstring: str, name: str) -> str:
    pieces = docstring.strip().split('\n\n', 1)
    if pieces[0].startswith('('):
        # Property docstrings don't contain the name.
        pieces[0] = name + pieces[0]
    elif not pieces[0].startswith(name):
        raise ValueError("Invalid docstring")
    signature = f'def {pieces[0]}:'
    if len(pieces) == 1 or not pieces[1].strip():
        return signature + ' ...'
    _, doc = pieces
    return f'{signature}\n{_make_docstring(doc)}'