import inspect


def get_summary_desc(func):
    """
    get summary, description from `func.__doc__`

    Summary and description are split by '\n\n'. If only one is provided,
    it will be used as summary.
    """
    doc = inspect.getdoc(func)
    if not doc:
        return None, None
    doc = doc.split("\n\n", 1)
    if len(doc) == 1:
        return doc[0], None
    return doc