def has_retriever_signature(function_info: "FunctionInfo") -> bool:
    """
    Checks if the given function signature follows the retriever format for MLflow, which is a
    list of Documents.

    Args:
        function_info: The function to determine if it has a valid retriever signature.

    Returns:
        bool: If the provided function has a valid retriever signature.
    """
    if "TABLE_TYPE" not in str(function_info.data_type):
        return False

    return_params = function_info.return_params

    if not (return_params and return_params.parameters):
        return False

    for param in return_params.parameters:
        param_dict = param.as_dict() if hasattr(param, "as_dict") else dict(param)

        if param_dict.get("name") == "page_content" and param_dict.get("type_name") == "STRING":
            return True

    return False

    Checks if the given function signature follows the retriever format for MLflow, which is a
    list of Documents.

    Args:
        function_info: The function to determine if it has a valid retriever signature.

    Returns:
        bool: If the provided function has a valid retriever signature.
    
ai/core/src/unitycatalog/ai/core/utils/validation_utils.py