

def testcasesStart(cntlr, options, modelXbrl, *args, **kwargs):
    modelManager = cntlr.modelManager
    if (hasattr(modelManager, 'efmFiling') and (modelXbrl.modelDocument.type in ModelDocument.Type.TESTCASETYPES)):
        efmFiling = modelManager.efmFiling
        efmFiling.close()
        del modelManager.efmFiling
        if ((not hasattr(modelXbrl, 'efmOptions')) and options):
            modelXbrl.efmOptions = options

dataset/ETHPy150Open Arelle/Arelle/arelle/plugin/validate/EFM/__init__.py testcasesStart/original