def write(self, path, data, offset): # {{{3
    try:
      length = len(data)
      self.__log_call('write', 'write(%r, %i, %i)', path, offset, length)
      start_time = time.time()
      buf = self.__get_file_buffer(path)
      buf.seek(offset)
      buf.write(data)
      self.time_spent_writing += start_time - time.time()
      # self.bytes_written is incremented from release().
      return length
    except Exception, e:
      return self.__except_to_status('write', e, errno.EIO)

  # Miscellaneous methods: {{{2
dataset/ETHPy150Open xolox/dedupfs/dedupfs.py/DedupFS.write/swapped operands of `-`