def METHOD_NAME(self, request: str, expected_resp_type: str = None, context: dict = None) -> dict:
    if context is None:
        context = self._sql_via_http_context
    payload = {
        'query': request,
        'context': context
    }
    response = self.api_request('post', '/sql/query', payload)
    assert response.status_code == 200, f"sql/query is not accessible - {response.text}"
    response = response.json()
    assert response.get('type') == (expected_resp_type or [RESPONSE_TYPE.OK, RESPONSE_TYPE.TABLE, RESPONSE_TYPE.ERROR])
    assert isinstance(response.get('context'), dict)
    if response['type'] == 'table':
        assert isinstance(response.get('data'), list)
        assert isinstance(response.get('column_names'), list)
    elif response['type'] == 'error':
        assert isinstance(response.get('error_code'), int)
        assert isinstance(response.get('error_message'), str)
    self._sql_via_http_context = response['context']
    return response