code: def write(version):
      # type: (str) -> None
      
      if not is_valid(version):
          raise ValueError("Invalid version: ".format(version))
  
      storage = get_version_storage()
      storage.write(version)
docs: Write the given version to the VERSION_FILE