# {py:mod}`arelle.utils.Contexts` ```{py:module} arelle.utils.Contexts ``` ```{autodoc2-docstring} arelle.utils.Contexts :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`ContextHashKey ` - ```{autodoc2-docstring} arelle.utils.Contexts.ContextHashKey :summary: ``` ```` ### Functions ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`partitionContexts ` - ```{autodoc2-docstring} arelle.utils.Contexts.partitionContexts :summary: ``` * - {py:obj}`partitionModelXbrlContexts ` - ```{autodoc2-docstring} arelle.utils.Contexts.partitionModelXbrlContexts :summary: ``` * - {py:obj}`getDuplicateContextGroups ` - ```{autodoc2-docstring} arelle.utils.Contexts.getDuplicateContextGroups :summary: ``` ```` ### API `````{py:class} ContextHashKey(context: arelle.ModelInstanceObject.ModelContext, dimensionalAspectModel: bool) :canonical: arelle.utils.Contexts.ContextHashKey ```{autodoc2-docstring} arelle.utils.Contexts.ContextHashKey ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} arelle.utils.Contexts.ContextHashKey.__init__ ``` ````{py:attribute} __slots__ :canonical: arelle.utils.Contexts.ContextHashKey.__slots__ :value: > ('context', 'dimensionalAspectModel', 'hash') ```{autodoc2-docstring} arelle.utils.Contexts.ContextHashKey.__slots__ ``` ```` ````{py:attribute} context :canonical: arelle.utils.Contexts.ContextHashKey.context :type: arelle.ModelInstanceObject.ModelContext :value: > None ```{autodoc2-docstring} arelle.utils.Contexts.ContextHashKey.context ``` ```` ````{py:attribute} dimensionalAspectModel :canonical: arelle.utils.Contexts.ContextHashKey.dimensionalAspectModel :type: bool :value: > None ```{autodoc2-docstring} arelle.utils.Contexts.ContextHashKey.dimensionalAspectModel ``` ```` ````{py:attribute} hash :canonical: arelle.utils.Contexts.ContextHashKey.hash :type: int :value: > None ```{autodoc2-docstring} arelle.utils.Contexts.ContextHashKey.hash ``` ```` ````{py:method} __eq__(o: typing.Any) -> bool :canonical: arelle.utils.Contexts.ContextHashKey.__eq__ ```` ````{py:method} __hash__() -> int :canonical: arelle.utils.Contexts.ContextHashKey.__hash__ ```` ````` ````{py:function} partitionContexts(contexts: collections.abc.Iterable[arelle.ModelInstanceObject.ModelContext], dimensionalAspectModel: bool) -> dict[arelle.utils.Contexts.ContextHashKey, tuple[arelle.ModelInstanceObject.ModelContext, ...]] :canonical: arelle.utils.Contexts.partitionContexts ```{autodoc2-docstring} arelle.utils.Contexts.partitionContexts ``` ```` ````{py:function} partitionModelXbrlContexts(modelXbrl: arelle.ModelXbrl.ModelXbrl) -> dict[arelle.utils.Contexts.ContextHashKey, tuple[arelle.ModelInstanceObject.ModelContext, ...]] :canonical: arelle.utils.Contexts.partitionModelXbrlContexts ```{autodoc2-docstring} arelle.utils.Contexts.partitionModelXbrlContexts ``` ```` ````{py:function} getDuplicateContextGroups(modelXbrl: arelle.ModelXbrl.ModelXbrl) -> list[tuple[arelle.ModelInstanceObject.ModelContext, ...]] :canonical: arelle.utils.Contexts.getDuplicateContextGroups ```{autodoc2-docstring} arelle.utils.Contexts.getDuplicateContextGroups ``` ````