<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def upload_keys(self, device_keys=None, one_time_keys=None):
 """Publishes end-to-end encryption keys for the device. Said device must be the one used when logging in. Args: device_keys (dict):
 Optional. Identity keys for the device. The required keys are: | user_id (str):
 The ID of the user the device belongs to. Must match the user ID used when logging in. | device_id (str):
 The ID of the device these keys belong to. Must match the device ID used when logging in. | algorithms (list<str>):
 The encryption algorithms supported by this device. | keys (dict):
 Public identity keys. Should be formatted as <algorithm:device_id>: <key>. | signatures (dict):
 Signatures for the device key object. Should be formatted as <user_id>: {<algorithm:device_id>: <key>} one_time_keys (dict):
 Optional. One-time public keys. Should be formatted as <algorithm:key_id>: <key>, the key format being determined by the algorithm. """

        content = {}
        if device_keys:
            content["device_keys"] = device_keys
        if one_time_keys:
            content["one_time_keys"] = one_time_keys
        return self._send("POST", "/keys/upload", content=content)