<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def col2name(col_item):
  "helper for SyntheticTable.columns. takes something from SelectX.cols, returns a string column name"
  if isinstance(col_item, sqparse2.NameX): return col_item.name
  elif isinstance(col_item, sqparse2.AliasX): return col_item.alias
  else: raise TypeError(type(col_item), col_item)