<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_summary_stats_to_table(table_in, table_out, colnames):
 """Collect summary statisitics from an input table and add them to an output table Parameters table_in : `astropy.table.Table` Table with the input data. table_out : `astropy.table.Table` Table with the output data. colnames : list List of the column names to get summary statistics for. """

    for col in colnames:
        col_in = table_in[col]
        stats = collect_summary_stats(col_in.data)
        for k, v in stats.items():
            out_name = "%s_%s" % (col, k)
            col_out = Column(data=np.vstack(
                [v]), name=out_name, dtype=col_in.dtype, shape=v.shape, unit=col_in.unit)
            table_out.add_column(col_out)