def _parse_function(sql, example, anonymize_values):
  """Parse the part relative to a Function in the SQL query."""
  successful_copy = True
  for item in sql:
    if _is_parenthesis(item):
      successful_copy = populate_sql(item, example,
                                     anonymize_values) and successful_copy
      continue
    if _is_identifier(item) and item.value.lower() in ('count', 'avg', 'min',
                                                       'max', 'sum',
                                                       'distinct'):
      _add_simple_step(item, example)
      continue

    _debug_state(item, example)
    raise ParseError('Incomplete _parse_function')
  return successful_copy
Parse the part relative to a Function in the SQL query.
language/xsp/data_preprocessing/sql_parsing.py