code: def _categories_content_from_evokeds(evoked):
      """Return categories.xml content for evoked dataset."""
      content = dict()
      begin_time = 0
      for ave in evoked:
          # Times are converted to microseconds
          sfreq = ave.info["sfreq"]
          duration = np.round(len(ave.times) / sfreq * 1e6).astype(int)
          end_time = begin_time + duration
          event_time = begin_time - np.round(ave.tmin * 1e6).astype(int)
          eeg_bads = _get_bad_eeg_channels(ave.info)
          content[ave.comment] = [
              _build_segment_content(
                  begin_time,
                  end_time,
                  event_time,
                  eeg_bads,
                  name="Average",
                  nsegs=ave.nave,
              )
          ]
          begin_time += duration
      return content
  
file_path: mne-python/mne/export/_egimff.py
imports: import datetime
  import os
  import os.path
  import shutil
  import numpy
  from .._fiff.pick import pick_channels, pick_types
  from ..io.egi.egimff import _import_mffpy
  from ..utils import _check_fname, verbose, warn
label_desc: Use image node_id 2 for calling a global function with example usage: _categories_content_from_evokeds(evoked) and returns: content