

def testcaseVariationXbrlLoaded(testcaseModelXbrl, instanceModelXbrl, modelTestcaseVariation, *args, **kwargs):
    modelManager = instanceModelXbrl.modelManager
    if (hasattr(testcaseModelXbrl, 'efmOptions') and modelManager.validateDisclosureSystem and getattr(modelManager.disclosureSystem, 'EFMplugin', False) and ((instanceModelXbrl.modelDocument.type == ModelDocument.Type.INSTANCE) or (instanceModelXbrl.modelDocument.type == ModelDocument.Type.INLINEXBRL))):
        cntlr = modelManager.cntlr
        options = testcaseModelXbrl.efmOptions
        entrypointFiles = [{
            'file': instanceModelXbrl.modelDocument.uri,
        }]
        if (not hasattr(modelManager, 'efmFiling')):
            modelManager.efmFiling = Filing(cntlr, options, instanceModelXbrl.fileSource, entrypointFiles, None, None, instanceModelXbrl.errorCaptureLevel)
            for pluginXbrlMethod in pluginClassMethods('EdgarRenderer.Filing.Start'):
                pluginXbrlMethod(cntlr, options, entrypointFiles, modelManager.efmFiling)
        modelManager.efmFiling.addReport(instanceModelXbrl)
        _report = modelManager.efmFiling.reports[(- 1)]
        _report.entryPoint = entrypointFiles[0]
        modelManager.efmFiling.arelleUnitTests = instanceModelXbrl.arelleUnitTests.copy()
        for _instanceElt in XmlUtil.descendants(modelTestcaseVariation, '*', 'instance', 'readMeFirst', 'true', False):
            if instanceModelXbrl.modelDocument.uri.endswith(_instanceElt.text):
                if _instanceElt.get('exhibitType'):
                    _report.entryPoint['exhibitType'] = _report.exhibitType = _instanceElt.get('exhibitType')
                break

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