def ValidateApiQuery(request_input):
  """Validates API Query settings.

  Args:
    request_input: The incoming request object containing form input value.

  Returns:
    A dict containing the validated API Query values or None if the input
    was invalid.
    e.g. {'name': 'Query Name',
          'request': 'http://apirequest',
          'refresh_interval': 15
         }
  """
  if request_input:
    name = request_input.get('name')
    request = request_input.get('request')
    refresh_interval = request_input.get('refresh_interval')
    validated_request = None
    try:
      if not name or not request or not refresh_interval:
        return None

      if co.MAX_NAME_LENGTH > len(name) or len(name) <= 0:
        return None
      validated_request = {
          'name': name
      }

      if len(request) > co.MAX_URL_LENGTH or len(request) <= 0:
        return None
      validated_request['request'] = request

      if int(refresh_interval) not in range(co.MIN_INTERVAL, co.MAX_INTERVAL):
        return None
      validated_request['refresh_interval'] = int(refresh_interval)
    except (ValueError, TypeError):
      return None
    return validated_request

  return None
dataset/ETHPy150Open googleanalytics/google-analytics-super-proxy/src/controllers/util/query_helper.py/ValidateApiQuery/swapped operands of `>`