# Buggy code
def update_info(self, role=None, status=None):
    """Edit an existing collaboration on Box

    :param role:
        The new role for this collaboration or None to leave unchanged
    :type role:
        :class:`CollaborationRole`
    :param status:
        The new status for this collaboration or None to leave unchanged. A pending collaboration can be set to
        accepted or rejected if permissions allow it.
    :type status:
        :class:`CollaborationStatus`
    :returns:
        Whether or not the edit was successful.
    :rtype:
        `bool`
    :raises:
        :class:`BoxAPIException` if current user doesn't have permissions to edit the collaboration.
    """
    # pylint:disable=arguments-differ
    data = {}
    if role:
        data["role"] = role
    if status:
        data["status"] = status
    return super(Collaboration, self).update_info(data=data)


# Traceback (boxsdk.exception.BoxAPIException)
Adding collab
Updated collab
Traceback (most recent call last):
File "./box_reorg_test.py", line 43, in <module>
main()
File "./box_reorg_test.py", line 33, in main
_ = src_collab.update_info(CollaborationRole.OWNER)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/util/api_call_decorator.py", line 71, in call
return method(*args, **kwargs)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/object/collaboration.py", line 61, in update_info
return super(Collaboration, self).update_info(data=data)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/util/api_call_decorator.py", line 71, in call
return method(*args, **kwargs)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/object/base_object.py", line 127, in update_info
box_response = self._session.put(url, data=json.dumps(data), params=params, headers=headers, **kwargs)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/session/session.py", line 121, in put
return self.request('PUT', url, **kwargs)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/session/session.py", line 157, in request
response = self._prepare_and_send_request(method, url, **kwargs)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/session/session.py", line 400, in _prepare_and_send_request
self._raise_on_unsuccessful_request(network_response, request)
File "/Users/my_username/workspace/box-scripts/venv/lib/python3.7/site-packages/boxsdk/session/session.py", line 332, in _raise_on_unsuccessful_request
network_response=network_response,
boxsdk.exception.BoxAPIException: Message: Non-json response received, while expecting json response.
Status: 204
Code: None
Request ID: None
Headers: {'Date': 'Mon, 27 Jul 2020 23:16:54 GMT', 'Connection': 'keep-alive', 'Strict-Transport-Security': 'max-age=31536000', 'Cache-Control': 'no-cache, no-store', 'BOX-REQUEST-ID': '065305bafe80ff3870567b8c931b5d5aa'}
URL: https://api.box.com/2.0/collaborations/27688108163
Method: PUT
Context Info: None

# Fixed code
def update_info(self, role=None, status=None):
    """Edit an existing collaboration on Box

    :param role:
        The new role for this collaboration or None to leave unchanged
    :type role:
        :class:`CollaborationRole`
    :param status:
        The new status for this collaboration or None to leave unchanged. A pending collaboration can be set to
        accepted or rejected if permissions allow it.
    :type status:
        :class:`CollaborationStatus`
    :returns:
        Whether or not the edit was successful.
    :rtype:
        `bool`
    :raises:
        :class:`BoxAPIException` if current user doesn't have permissions to edit the collaboration.
    """
    # pylint:disable=arguments-differ,no-else-return
    data = {}
    if role:
        data["role"] = role
    if status:
        data["status"] = status
    if role == CollaborationRole.OWNER:
        return super(Collaboration, self).update_info(
            data=data, expect_json_response=False
        )
    else:
        return super(Collaboration, self).update_info(data=data)