def query_events(resource_root, query_str=None):
  """
  Search for events.
  @param query_str: Query string.
  @return: A list of ApiEvent.
  """
  params = None
  if query_str:
    params = dict(query=query_str)
  return call(resource_root.get, EVENTS_PATH, ApiEventQueryResult,
      params=params)
Search for events.
  @param query_str: Query string.
  @return: A list of ApiEvent.