code: def write_position(fp, position, value, fmt='I'):
      
      current_position = fp.tell()
      fp.seek(position)
      written = write_bytes(fp, struct.pack(str('>' + fmt), value))
      fp.seek(current_position)
      return written
docs: Writes a value to the specified position.
  
      :param fp: file-like object
      :param position: position of the value marker
      :param value: value to write
      :param fmt: format of the value
      :return: written byte size