def _HasParens(s):
  """Return True if there are parentheses in the given string."""
  # Monorail cannot handle parenthesized expressions, so we tell the
  # user that immediately.  Even inside a quoted string, the GAE search
  # engine will not handle parens in TEXT-type fields.
  return '(' in s or ')' in s