<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_tables(cols):
 """Builds and returns a Dictionary whose keys are table names and values are OrderedDicts whose keys are column names and values are the col objects from which the definition is derived. """

  tables = OrderedDict()
  for col in cols:
    tname = col["table_name"]
    if tname not in tables:
      tables[tname] = OrderedDict()
    tables[tname][col["column_name"]] = col
  return tables