def METHOD_NAME():
    if PatchMegEngineModelIO.__patched:
        return
    if 'megengine' not in sys.modules:
        return
    PatchMegEngineModelIO.__patched = True
    # noinspection PyBroadException
    try:
        import megengine as mge  # noqa
        mge.save = _patched_call(mge.save, PatchMegEngineModelIO._save)
        mge.load = _patched_call(mge.load, PatchMegEngineModelIO._load)
        # no need to worry about recursive calls, _patched_call takes care of that  # noqa
        if hasattr(mge, 'serialization') and hasattr(mge.serialization, 'save'):  # noqa
            mge.serialization.save = _patched_call(
                mge.serialization.save, PatchMegEngineModelIO._save
            )
        if hasattr(mge, 'serialization') and hasattr(mge.serialization, 'load'):  # noqa
            mge.serialization.load = _patched_call(
                mge.serialization.load, PatchMegEngineModelIO._load,
            )
    except ImportError:
        pass
    except Exception:
        pass