from typing import Optional
from typing import Callable
import inspect


def retrieve_full_description_for_handler(
    full_description: Optional[str],
    handler: Callable,
) -> str:
    """Retrieve full description for handler.

    Arguments:
        full_description: passed name for handler.
        handler: handler from which docstring will be used.

    Returns:
        Full description for handler.
    """
    return full_description or inspect.cleandoc(handler.__doc__ or "")