code: def _perform_command(user, command_type, command_args):
      
      command_uuid = _gen_uuid()
      command = {
          'type': command_type,
          'args': command_args,
          'uuid': command_uuid,
          'temp_id': _gen_uuid()
      }
      commands = json.dumps([command])
      response = API.sync(user.api_token, user.sync_token, commands=commands)
      _fail_if_contains_errors(response, command_uuid)
      response_json = response.json()
      user.sync_token = response_json['sync_token']
docs: Perform an operation on Todoist using the API sync end-point.