def METHOD_NAME(accept_mimetypes, default_mimetype) -> Tuple[bool, str]:
    """
    This function determinate if the response should be JSON or XML based on
    the accepted mimetypes of the request and the default mimetype provided,
    which will be used in case both are equally accepted.
    :param accept_mimetypes: determinate which mimetypes are accepted
    :param default_mimetype: "text/xml", "application/json"
    :return: Tuple[bool, str] -
        bool - True: The response type is JSON, False: Otherwise - XML
        str - The output mimetype
    """
    accept_json = \
        accept_mimetypes.accept_json or \
        accept_mimetypes.best is None or \
        'json' in accept_mimetypes.best.lower()
    accept_xhtml = \
        accept_mimetypes.accept_xhtml or \
        accept_mimetypes.best is None or \
        'xml' in accept_mimetypes.best.lower()
    if not default_mimetype:
        default_mimetype = get_default_response_mimetype()
    json_is_default = 'json' in default_mimetype or '*' in default_mimetype
    json_response = (accept_json and (not accept_xhtml or json_is_default)) or \
                    (json_is_default and accept_json == accept_xhtml)
    mimetype = 'application/json' if json_response else 'text/xml' if accept_xhtml else ''
    return json_response, mimetype