def getargspecfromtext(text):
    """
    Try to get the formatted argspec of a callable from the first block of its
    docstring
    
    This will return something like
    '(foo, bar, k=1)'
    """
    blocks = text.split("\n\n")
    first_block = blocks[0].strip()
    return getsignaturefromtext(first_block, '')