def METHOD_NAME(self, data, offset):
    if offset < 0:
        raise ValueError('Offset cannot be negative')
    self.f.seek(offset, os.SEEK_SET)
    # XXX the original uploadFile acquires an exclusive lock while writing, 
    # for no reason that I can discern
    self.f.write(data)
    self.f.flush()