'Create or update a multi.'

@require_oauth2_scope('subscribe')
@validate(VUser(), VModhash(), path_info=VMultiPath('multipath'), data=VValidatedJSON('model', multi_json_spec))
@api_doc(api_section.multis, extends=GET_multi)
def PUT_multi(self, path_info, data):

    owner = self._check_new_multi_path(path_info)
    try:
        multi = LabeledMulti._byID(path_info['path'])
    except tdb_cassandra.NotFound:
        multi = LabeledMulti.create(path_info['path'], owner)
        response.status = 201
    self._write_multi_data(multi, data)
    return self._format_multi(multi)
