def update_docstring(thing_with_docstring, deprecation):
    """Update an existing docstring based on a deprecation.

    Parameters
    ----------
    thing_with_docstring : object
        The deprecated class/method whose docstring should be modified.
    deprecation : :class:`.Deprecation`
        Deprecation instance.

    Returns
    -------
    str :
        updated docstring
    """
    docs = thing_with_docstring.__doc__
    if thing_with_docstring.__doc__ is None:
        docs = ''
    else:
        docs = thing_with_docstring.__doc__
    return docs + deprecation.docstring_message()
