docs: def write_binary_dat_format(recording, save_path, time_axis=0, dtype=None, chunksize=None):
      '''Saves the traces of a recording extractor in binary .dat format.
  
      Parameters
      ----------
      recording: RecordingExtractor
          The recording extractor object to be saved in .dat format
      save_path: str
          The path to the file.
      time_axis: 0 (default) or 1
          If 0 then traces are transposed to ensure (nb_sample, nb_channel) in the file.
          If 1, the traces shape (nb_channel, nb_sample) is kept in the file.
      dtype: dtype
          Type of the saved data. Default float32
      chunksize: None or int
          If not None then the copy done by chunk size.
          Thi avoid to much memory consumption for big files.
      Returns
      -------
      '''
      save_path = Path(save_path)
      if save_path.suffix == '':
          # when suffix is already raw/bin/dat do not change it.
          save_path = save_path.parent / (save_path.name + '.dat')
  
      if chunksize is None:
          traces = recording.get_traces()
          if dtype is not None:
              traces = traces.astype(dtype)
          if time_axis == 0:
              traces = traces.T
          with save_path.open('wb') as f:
              traces.tofile(f)
      else:
          assert time_axis ==0, 'chunked writting work only with time_axis 0'
          n_sample = recording.get_num_frames()
          n_chan = recording.get_num_channels()
          n_chunk = n_sample // chunksize
          if n_sample % chunksize > 0:
              n_chunk += 1
          with save_path.open('wb') as f:
              for i in range(n_chunk):
                  traces = recording.get_traces(start_frame=i*chunksize,
                                              end_frame=min((i+1)*chunksize, n_sample))
                  if dtype is not None:
                      traces = traces.astype(dtype)
                  if time_axis == 0:
                      traces = traces.T
                  f.write(traces.tobytes())
  
      return save_path