def _strip_cache_events(data, opts):
 event_data = copy.deepcopy(data)
 strip_fields = opts.get('cache_event_strip_fields', [])
 for field in strip_fields:
  if (field in event_data):
   del event_data[field]
 return event_data

def _strip_cache_events ( data , opts ) : event_data = copy . deepcopy ( data ) strip_fields = opts . get ( 'cache_event_strip_fields' , [ ] ) for field in strip_fields : if ( field in event_data ) : del event_data [ field ] return event_data
strip out user-configured sensitive event data .