from typing import Callable
from typing import Any


def get_description(function: Callable[..., Any]) -> str:
    """
    Extract the first line of the docstring as a description for a step function.

    :param call: The step function
    :return str: The step description
    :raise ValueError: When `call` does not have a docstring
    """
    if function.__doc__ is None:
        raise ValueError(f"{function} does not have a docstring")

    return function.__doc__.strip().split("\n")[0]