def create_response(request, **kwargs):
    connection = kwargs.pop('connection', _FakeConnection())

    _check_body_arguments(**kwargs)

    raw = kwargs.pop('raw', None)
    body = kwargs.pop('body', None)
    content = kwargs.pop('content', None)
    text = kwargs.pop('text', None)
    json = kwargs.pop('json', None)
    encoding = None

    if content and not isinstance(content, six.binary_type):
        raise TypeError('Content should be a callback or binary data')
    if text and not isinstance(text, six.string_types):
        raise TypeError('Text should be a callback or string data')

    if json is not None:
        text = jsonutils.dumps(json)
    if text is not None:
        encoding = 'utf-8'
        content = text.encode(encoding)
    if content is not None:
        body = six.BytesIO(content)
    if not raw:
        raw = HTTPResponse(status=kwargs.get('status_code', _DEFAULT_STATUS),
                           headers=kwargs.get('headers', {}),
                           reason=kwargs.get('reason'),
                           body=body or six.BytesIO(six.b('')),
                           decode_content=False,
                           preload_content=False,
                           original_response=compat._fake_http_response)

    response = _http_adapter.build_response(request, raw)
    response.connection = connection
    response.encoding = encoding

    _extract_cookies(request, response, kwargs.get('cookies'))

    return response
Returns a QPoint containing the scene location the center of this view 
dataset/ETHPy150Open openstack/requests-mock/requests_mock/response.py/create_response--crossover with--dataset/ETHPy150Open andrew-gardner/dependsworkflow/depends/depends_graphics_widgets.py/GraphicsViewWidget.centerCoordinates