<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_for_invalid_columns(problems, table, df):
 """ Check for invalid columns in the given ProtoFeed DataFrame. Parameters problems : list A four-tuple containing 1. A problem type (string) equal to ``'error'`` or ``'warning'``; ``'error'`` means the ProtoFeed is violated; ``'warning'`` means there is a problem but it is not a ProtoFeed violation 2. A message (string) that describes the problem 3. A ProtoFeed table name, e.g. ``'meta'``, in which the problem occurs 4. A list of rows (integers) of the table's DataFrame where the problem occurs table : string Name of a ProtoFeed table df : DataFrame The ProtoFeed table corresponding to ``table`` Returns ------- list The ``problems`` list extended as follows. Check whether the DataFrame contains extra columns not in the ProtoFeed and append to the problems list one warning for each extra column. """

    r = cs.PROTOFEED_REF
    valid_columns = r.loc[r['table'] == table, 'column'].values
    for col in df.columns:
        if col not in valid_columns:
            problems.append(['warning',
              'Unrecognized column {!s}'.format(col),
              table, []])

    return problems