def _remove_dataset_fields(content):
 content = yaml.safe_load(content)
 dataset = content['dataset']
 for key in dataset:
  if (key not in _ok_to_log):
   dataset[key] = 'REMOVED'
 return yaml.safe_dump(content)

def _remove_dataset_fields ( content ) : content = yaml . safe_load ( content ) dataset = content [ 'dataset' ] for key in dataset : if ( key not in _ok_to_log ) : dataset [ key ] = 'REMOVED' return yaml . safe_dump ( content )
remove non-whitelisted fields from dataset for logging .