"""Loads the code under test.By default the tests import YOUR files from m01_autograd/. The AILAB_IMPLenvironment variable points them at another folder instead, so a secondimplementation can be run against the same tests. You never need to set it."""importimportlibimportosimportsysfrompathlibimportPathLAB_DIR=Path(__file__).resolve().parents[1]IMPL_DIR=Path(os.environ.get("AILAB_IMPL")orLAB_DIR).resolve()ifstr(IMPL_DIR)notinsys.path:sys.path.insert(0,str(IMPL_DIR))defload(name):"""Import engine, gradcheck, nn, or train from the folder under test."""returnimportlib.import_module(name)