

def validateXbrlStart(val, parameters=None, *args, **kwargs):
    val.validateEFMplugin = (val.validateDisclosureSystem and getattr(val.disclosureSystem, 'EFMplugin', False))
    if (not val.validateEFMplugin):
        return
    val.paramExhibitType = None
    val.paramFilerIdentifier = None
    val.paramFilerIdentifierNames = None
    val.paramSubmissionType = None
    _cik = _cikList = _cikNameList = _exhibitType = _submissionType = None
    if parameters:
        p = parameters.get(ModelValue.qname('CIK', noPrefixIsNoNamespace=True))
        if (p and (len(p) == 2) and (p[1] not in ('null', 'None'))):
            _cik = p[1]
        p = parameters.get(ModelValue.qname('cikList', noPrefixIsNoNamespace=True))
        if (p and (len(p) == 2)):
            _cikList = p[1]
        else:
            _cikList = []
        p = parameters.get(ModelValue.qname('cikNameList', noPrefixIsNoNamespace=True))
        if (p and (len(p) == 2)):
            _cikNameList = p[1]
        p = parameters.get(ModelValue.qname('submissionType', noPrefixIsNoNamespace=True))
        if (p and (len(p) == 2)):
            _submissionType = p[1]
        p = parameters.get(ModelValue.qname('exhibitType', noPrefixIsNoNamespace=True))
        if (p and (len(p) == 2)):
            _exhibitType = args[1]
    if hasattr(val.modelXbrl.modelManager, 'efmFiling'):
        efmFiling = val.modelXbrl.modelManager.efmFiling
        if efmFiling.reports:
            entryPoint = efmFiling.reports[(- 1)].entryPoint
            _cik = (entryPoint.get('cik', None) or _cik)
            _cikList = (entryPoint.get('cikList', None) or _cikList)
            _cikNameList = (entryPoint.get('cikNameList', None) or _cikNameList)
            _exhibitType = (entryPoint.get('exhibitType', None) or _exhibitType)
            if (_exhibitType and _exhibitType.endswith('.INS')):
                _exhibitType = _exhibitType[:(- 4)]
            _submissionType = (entryPoint.get('submissionType', None) or _submissionType)
    if (_cik and (_cik not in ('null', 'None'))):
        val.paramFilerIdentifier = _cik
    if isinstance(_cikNameList, dict):
        val.paramFilerIdentifierNames = _cikNameList
    else:
        _filerIdentifiers = (_cikList.split(',') if _cikList else [])
        _filerNames = (_cikNameList.split('|Edgar|') if _cikNameList else [])
        if _filerIdentifiers:
            if (len(_filerNames) not in (0, len(_filerIdentifiers))):
                val.modelXbrl.error(('EFM.6.05.24.parameters', 'GFM.3.02.02'), _('parameters for cikList and cikNameList different list entry counts: %(cikList)s, %(cikNameList)s'), modelXbrl=val.modelXbrl, cikList=_filerIdentifiers, cikNameList=_filerNames)
            elif _filerNames:
                val.paramFilerIdentifierNames = dict(((_cik, _filerNames[i]) for (i, _cik) in enumerate(_filerIdentifiers)))
            else:
                val.paramFilerIdentifierNames = dict(((_cik, None) for _cik in _filerIdentifiers))
        elif _filerNames:
            val.modelXbrl.error(('EFM.6.05.24.parameters', 'GFM.3.02.02'), _('parameters for cikNameList provided but missing corresponding cikList: %(cikNameList)s'), modelXbrl=val.modelXbrl, cikNameList=_filerNames)
    if _exhibitType:
        val.paramExhibitType = _exhibitType
    if _submissionType:
        val.paramSubmissionType = _submissionType
    if (val.paramExhibitType == 'EX-2.01'):
        val.EFM60303 = 'EFM.6.23.01'
    else:
        val.EFM60303 = 'EFM.6.03.03'
    if any(((concept.qname.namespaceURI in val.disclosureSystem.standardTaxonomiesDict) for concept in val.modelXbrl.nameConcepts.get('UTR', ()))):
        val.validateUTR = True
    modelManager = val.modelXbrl.modelManager
    if hasattr(modelManager, 'efmFiling'):
        efmFiling = modelManager.efmFiling
        efmFiling.submissionType = val.paramSubmissionType

dataset/ETHPy150Open Arelle/Arelle/arelle/plugin/validate/EFM/__init__.py validateXbrlStart/VarMisuse@323/448 `p`->`args`