def make_sql_span(sql_token=None,
                  value_literal=None,
                  column=None,
                  table_name=None,
                  nested_statement=None):
  """SqlSpan constructor where only one argument should be non-None."""

  args = [sql_token, value_literal, column, table_name, nested_statement]
  if sum(arg is not None for arg in args) != 1:
    raise ParseError('Only one argument should be set: %s' % args)
  return SqlSpan(*args)
SqlSpan constructor where only one argument should be non-None.
language/xsp/data_preprocessing/abstract_sql.py