def METHOD_NAME(method, url, data_or_params=None, raw=False,
                    metric_action=None, metric_tags=None, paged_results=False):
    # To avoid dependency conflict
    from openedx.core.djangoapps.django_comment_common.models import ForumsConfig
    config = ForumsConfig.current()
    if not config.enabled:
        raise CommentClientMaintenanceError('service disabled')
    if metric_tags is None:
        metric_tags = []
    metric_tags.append(f'method:{method}')
    if metric_action:
        metric_tags.append(f'action:{metric_action}')
    if data_or_params is None:
        data_or_params = {}
    headers = {
        'X-Edx-Api-Key': config.api_key,
        'Accept-Language': get_language(),
    }
    request_id = uuid4()
    request_id_dict = {'request_id': request_id}
    if method in ['post', 'put', 'patch']:
        data = data_or_params
        params = request_id_dict
    else:
        data = None
        params = data_or_params.copy()
        params.update(request_id_dict)
    response = requests.request(
        method,
        url,
        data=data,
        params=params,
        headers=headers,
        timeout=config.connection_timeout
    )
    metric_tags.append(f'status_code:{response.status_code}')
    status_code = int(response.status_code)
    if status_code > 200:
        metric_tags.append('result:failure')
    else:
        metric_tags.append('result:success')
    if 200 < status_code < 500:  # lint-amnesty, pylint: disable=no-else-raise
        log.info(f'Investigation Log: CommentClientRequestError for request with {method} and params {params}')
        raise CommentClientRequestError(response.text, response.status_code)
    # Heroku returns a 503 when an application is in maintenance mode
    elif status_code == 503:
        raise CommentClientMaintenanceError(response.text)
    elif status_code == 500:
        raise CommentClient500Error(response.text)
    else:
        if raw:
            return response.text
        else:
            try:
                data = response.json()
            except ValueError:
                raise CommentClientError(  # lint-amnesty, pylint: disable=raise-missing-from
                    "Invalid JSON response for request {request_id}; first 100 characters: '{content}'".format(
                        request_id=request_id,
                        content=response.text[:100]
                    )
                )
            return data