def prepare_response(response, spec, default_response_content_type):
    """Rework response according to OAS version"""
    if spec.openapi_version.major < 3:
        if 'example' in response:
            response['examples'] = {default_response_content_type: response
                .pop('example')}
    else:
        for field in ('schema', 'example', 'examples'):
            if field in response:
                response.setdefault('content', {}).setdefault(
                    default_response_content_type, {})[field] = response.pop(
                    field)
