code: def eeg_erp(eeg, times=None, index=None, include="all", exclude=None, hemisphere="both", central=True, verbose=True, names="ERP", method="mean"):
      
      erp = {}
  
      data = eeg_to_df(eeg, index=index, include=include, exclude=exclude, hemisphere=hemisphere, central=central)
  
      for epoch_index, epoch in data.items():
          # Segment according to window
          if isinstance(times, list):
              if isinstance(times[0], list):
                  values = {}
                  for window_index, window in enumerate(times):
                      df = epoch[window[0]:window[1]]
                      value = df.mean().mean()
                      values[window_index] = value
                  erp[epoch_index] = values
              else:
                  df = epoch[times[0]:times[1]]
                  value = df.mean().mean()
                  erp[epoch_index] = [value]
          elif isinstance(times, tuple):
              values = {}
              for window_index, window in enumerate(times):
                  df = epoch[window[0]:window[1]]
                  if method == "max":
                      value = df.mean().max()
                  elif method == "min":
                      value = df.mean().min()
                  else:
                      value = df.mean().mean()
                  values[window_index] = value
              erp[epoch_index] = values
          else:
              df = epoch[0:]
              value = df.mean().mean()
              erp[epoch_index] = [value]
  
      # Convert to dataframe
      erp = pd.DataFrame.from_dict(erp, orient="index")
      if isinstance(names, str):
          names = [names]
      if len(names) == len(erp.columns):
          erp.columns = names
  
      return(erp)
docs: DOCS INCOMPLETE :(