

def testcaseVariationValidated(testcaseModelXbrl, instanceModelXbrl, errors=None, *args, **kwargs):
    modelManager = instanceModelXbrl.modelManager
    if (hasattr(modelManager, 'efmFiling') and ((instanceModelXbrl.modelDocument.type == ModelDocument.Type.INSTANCE) or (instanceModelXbrl.modelDocument.type == ModelDocument.Type.INLINEXBRL))):
        efmFiling = modelManager.efmFiling
        if isinstance(errors, list):
            del efmFiling.errors[:]
        filingValidate(efmFiling.cntlr, efmFiling.options, efmFiling.filesource, efmFiling.entrypointfiles, efmFiling.sourceZipStream, efmFiling.responseZipStream)
        if isinstance(errors, list):
            errors.extend(efmFiling.errors)
        filingEnd(modelManager.cntlr, efmFiling.options, modelManager.filesource, [])
        testcaseModelXbrl.modelManager.cntlr.logHandler.flush()

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