def METHOD_NAME(cls, check: Check) -> "SerializedCheck":
    if check.response is not None:
        request = Request.from_prepared_request(check.response.request)
    elif check.request is not None:
        # Response is not available, but it is not an error (only time-out behaves this way at the moment)
        request = Request.from_prepared_request(check.request)
    else:
        raise InternalError("Can not find request data")
    response: Optional[Response]
    if isinstance(check.response, requests.Response):
        response = Response.from_requests(check.response)
    elif isinstance(check.response, WSGIResponse):
        response = Response.from_wsgi(check.response, check.elapsed)
    else:
        response = None
    headers = {key: value[0] for key, value in request.headers.items() if key not in IGNORED_HEADERS}
    history = []
    case = check.example
    while case.source is not None:
        if isinstance(case.source.response, requests.Response):
            history_response = Response.from_requests(case.source.response)
        else:
            history_response = Response.from_wsgi(case.source.response, case.source.elapsed)
        entry = SerializedHistoryEntry(
            case=SerializedCase.from_case(case.source.case, headers), response=history_response
        )
        history.append(entry)
        case = case.source.case
    return cls(
        name=check.name,
        value=check.value,
        example=SerializedCase.from_case(check.example, headers),
        message=check.message,
        request=request,
        response=response,
        context=check.context,
        history=history,
    )