def get_short_docstring(component: type) -> str:
    """Get the short description from a component's docstring.

    Args:
        component (type): The component to extract the docstring from.

    Returns:
        str: The short description from the docstring, or empty string if no docstring.

    Example:
        >>> class MyClass:
        ...     '''My class description.
        ...
        ...     More details here.
        ...     '''
        ...     pass

        >>> output = get_short_docstring(MyClass)
        >>> print(output)
        My class description.
    """
    if component.__doc__ is None:
        return ""
    docstring = docstring_parser.parse(component.__doc__)
    return docstring.short_description
Get the short description from a component's docstring.

    Args:
        component (type): The component to extract the docstring from.

    Returns:
        str: The short description from the docstring, or empty string if no docstring.

    Example:
        >>> class MyClass:
        ...     '''My class description.
        ...
        ...     More details here.
        ...     '''
        ...     pass

        >>> output = get_short_docstring(MyClass)
        >>> print(output)
        My class description.
    
src/anomalib/cli/utils/help_formatter.py