code: def write_brainvision(data, filename, markers=None):
      
      filename = Path(filename).resolve().with_suffix('.vhdr')
      if markers is None:
          markers = []
  
      with filename.open('w') as f:
          f.write(_write_vhdr(data, filename))
  
      with filename.with_suffix('.vmrk').open('w') as f:
          f.write(_write_vmrk(data, filename, markers))
  
      _write_eeg(data, filename)
docs: Export data in BrainVision format
  
      Parameters
      ----------
      data : instance of ChanTime
          data with only one trial
      filename : path to file
          file to export to (use '.vhdr' as extension)