def check_docstring_signature_consistency(
    doc_params: Optional[dict[str, str]], signature_params: Set[str], func_name: str
) -> None:
    """
    Checks for inconsistencies between docstring parameters and function signature parameters.
    Issues warnings if there are mismatches.

    Args:
        doc_params (Optional[dict[str, str]]): Parameters documented in the docstring.
        signature_params (Set[str]): Parameters present in the function signature.
        func_name (str): The name of the function being checked.

    Returns:
        None
    """
    params_in_doc = set(doc_params.keys() or {})

    if extra_in_doc := params_in_doc - signature_params:
        warnings.warn(
            f"In function '{func_name}': The following parameters are documented in the docstring but not present in the function signature: {', '.join(sorted(extra_in_doc))}",
            UserWarning,
            stacklevel=2,
        )

    if extra_in_signature := signature_params - params_in_doc:
        warnings.warn(
            f"In function '{func_name}': The following parameters are present in the function signature but not documented in the docstring: {', '.join(sorted(extra_in_signature))}",
            UserWarning,
            stacklevel=2,
        )

    if doc_params and not signature_params:
        warnings.warn(
            f"In function '{func_name}': Docstring defines parameters, but the function has no parameters in its signature.",
            UserWarning,
            stacklevel=2,
        )

    if not doc_params and signature_params:
        warnings.warn(
            f"In function '{func_name}': Function has parameters in its signature, but the docstring does not document any parameters.",
            UserWarning,
            stacklevel=2,
        )

    Checks for inconsistencies between docstring parameters and function signature parameters.
    Issues warnings if there are mismatches.

    Args:
        doc_params (Optional[dict[str, str]]): Parameters documented in the docstring.
        signature_params (Set[str]): Parameters present in the function signature.
        func_name (str): The name of the function being checked.

    Returns:
        None
    
ai/core/src/unitycatalog/ai/core/utils/callable_utils.py