code: def required_event_fields(next_value_columns, previous_value_columns):
      
      # These metadata columns are used to align event indexers.
      return {
          TS_FIELD_NAME,
          SID_FIELD_NAME,
          EVENT_DATE_FIELD_NAME,
      }.union(
          # We also expect any of the field names that our loadable columns
          # are mapped to.
          viewvalues(next_value_columns),
          viewvalues(previous_value_columns),
      )
docs: Compute the set of resource columns required to serve
      ``next_value_columns`` and ``previous_value_columns``.