def has_query_params(resource, operation):
  """
  Checks whether the specified operation accepts any query parameters.

  Args:
    resource  The resource to which the operation belongs
    operation The operation which is being tested for query parameters

  Returns:
    True if the operation accepts any query parameters or False otherwise
  """
  if operation.input:
    params = operation.input.params
    for param in params:
      if param.binding:
        for binding in resource.input_bindings:
          if binding.id == param.binding and binding.mode == 'query':
            return True
      elif param.mode == 'query':
        return True
  return False