code: def eeg_to_all_evokeds(all_epochs, conditions=None):
      
      if conditions is None:
          # Get event_id
          conditions = {}
          for participant, epochs in all_epochs.items():
              conditions.update(epochs.event_id)
  
      all_evokeds = {}
      for participant, epochs in all_epochs.items():
          evokeds = {}
          for cond in conditions:
              try:
                  evokeds[cond] = epochs[cond].average()
              except KeyError:
                  pass
          all_evokeds[participant] = evokeds
  
      return(all_evokeds)
docs: Convert all_epochs to all_evokeds.
  
      DOCS INCOMPLETE :(