def METHOD_NAME(url, url_object, master_endpoint_list):
    """
    Ensures that an endpoint_doc property and a docstring is provided for the
    view associated with the provided url and checks that the URL is mentioned
    in the master endpoints.md doc.
    """
    qualified_name = url_object.lookup_str
    # This endpoint provides a message to users that the endpoint has been removed and, as such, needs no contract.
    if qualified_name == "usaspending_api.common.views.RemovedEndpointView":
        return []
    # Handles class and function based views.
    view = url_object.callback.cls if getattr(url_object.callback, "cls", None) else url_object.callback
    messages = []
    if not hasattr(view, "endpoint_doc"):
        messages.append("{} ({}) missing endpoint_doc property".format(qualified_name, url))
    else:
        endpoint_doc = getattr(view, "endpoint_doc")
        if not endpoint_doc:
            messages.append("{}.endpoint_doc ({}) is invalid".format(qualified_name, url))
        else:
            absolute_endpoint_doc = str(REPO_DIR / endpoint_doc)
            if not case_sensitive_file_exists(absolute_endpoint_doc):
                messages.append(
                    "{}.endpoint_doc ({}) references a file that does not exist ({})".format(
                        qualified_name, url, endpoint_doc
                    )
                )
    if not (view.__doc__ or "").strip():
        messages.append(
            f"{qualified_name} ({url}) has no docstring.  The docstring is used to provide documentation in "
            f"the Django Rest Framework default UI.  It provides a modicum of help on an otherwise completely "
            f"blank page."
        )
    # Fix up the url a little so we can pattern match it.
    pattern = url + ("" if url.endswith("/") else "/") + "?"  # Optional trailing slash.
    # See if we can find anything in the master endpoint list that matches this pattern.
    for endpoint in master_endpoint_list:
        if re.fullmatch(pattern, endpoint):
            break
    else:
        messages.append("No URL found in {} that matches {} ({})".format(ENDPOINTS_MD, url, qualified_name))
    return messages