def NewClientLogUrl(client, obj_store, user_id, device_id, request, callback):
  """Gets an S3 PUT URL for clients to write mobile device logs."""
  kwargs = {'user_id': user_id,
            'device_id': device_id,
            'timestamp': request['timestamp'],
            'client_log_id': request['client_log_id']}
  if 'content_type' in request:
    kwargs['content_type'] = request['content_type']
  if request in 'content_md5':
    kwargs['content_md5'] = request['content_md5']
  if 'num_bytes' in request:
    kwargs['max_bytes'] = request['num_bytes']

  logging.info('GET NEW CLIENT LOG URL: user: %d, device: %d, client log id: %s' %
                 (user_id, device_id, request['client_log_id']))
  response = {'client_log_put_url': ClientLog.GetPutUrl(**kwargs)}
  callback(response)
dataset/ETHPy150Open viewfinderco/viewfinder/backend/www/service.py/NewClientLogUrl/swapped operands of `in`