################################################################################ Copyright 2019 UChicago Argonne, LLC.# (c.f. AUTHORS, LICENSE)## This file is part of the NRM project.# For more info, see https://xgitlab.cels.anl.gov/argo/nrm## SPDX-License-Identifier: BSD-3-Clause###############################################################################importwarlockimportjsonimportosfromjsonschemaimportDraft4Validatordefloadschema(api):sourcedir=os.path.dirname(os.path.realpath(__file__))withopen(os.path.join(sourcedir,"schemas",api+".json"))asf:s=json.load(f)Draft4Validator.check_schema(s)return(warlock.model_factory(s))