docs: def write_recording(recording, save_path):
          '''
          Save recording extractor to MEArec format.
          Parameters
          ----------
          recording: RecordingExtractor
              Recording extractor object to be saved
          save_path: str
              .h5 or .hdf5 path
          '''
          assert HAVE_MREX, "To use the MEArec extractors, install MEArec: \n\n pip install MEArec\n\n"
          save_path = Path(save_path)
          if save_path.is_dir():
              print("The file will be saved as recording.h5 in the provided folder")
              save_path = save_path / 'recording.h5'
          if save_path.suffix == '.h5' or save_path.suffix == '.hdf5':
              info = {'recordings': {'fs': recording.get_sampling_frequency()}}
              rec_dict = {'recordings': recording.get_traces()}
              if 'location' in recording.get_channel_property_names():
                  positions = np.array([recording.get_channel_property(chan, 'location')
                                        for chan in recording.get_channel_ids()])
                  rec_dict['channel_positions'] = positions
              recgen = mr.RecordingGenerator(rec_dict=rec_dict, info=info)
              mr.save_recording_generator(recgen, str(save_path), verbose=False)
          else:
              raise Exception("Provide a folder or an .h5/.hdf5 as 'save_path'")