code: def validate_column_specs(events, next_value_columns, previous_value_columns):
      
      required = required_event_fields(next_value_columns,
                                       previous_value_columns)
      received = set(events.columns)
      missing = required - received
      if missing:
          raise ValueError(
              "EventsLoader missing required columns {missing}.\n"
              "Got Columns: {received}\n"
              "Expected Columns: {required}".format(
                  missing=sorted(missing),
                  received=sorted(received),
                  required=sorted(required),
              )
          )
docs: Verify that the columns of ``events`` can be used by an EventsLoader to
      serve the BoundColumns described by ``next_value_columns`` and
      ``previous_value_columns``.