# Path: pandasdmx/util.py
#     HAS_REQUESTS_CACHE = False
#     HAS_REQUESTS_CACHE = True
# KT = TypeVar("KT")
# VT = TypeVar("VT")
# CLASS_NAME = {
#     "dataflow": "DataflowDefinition",
#     "datastructure": "DataStructureDefinition",
# }
# VALUE = {v: k for k, v in CLASS_NAME.items()}
# RESPONSE_CODE = {
#     200: "OK",
#     304: "No changes",
#     400: "Bad syntax",
#     401: "Unauthorized",
#     403: "Semantic error",  # or "Forbidden"
#     404: "Not found",
#     406: "Not acceptable",
#     413: "Request entity too large",
#     414: "URI too long",
#     500: "Internal server error",
#     501: "Not implemented",
#     503: "Unavailable",
# }
# KT = TypeVar("KT")
# VT = TypeVar("VT")
# class Resource(str, Enum):
# class BaseModel(pydantic.BaseModel):
#     class Config:
# class MaybeCachedSession(type):
# class BaseModel(pydantic.BaseModel):
#     class Config:
# class MaybeCachedSession(type):
# class DictLike(dict, typing.MutableMapping[KT, VT]):
#     def from_obj(cls, obj):
#     def class_name(cls, value: "Resource", default=None) -> str:
#     def describe(cls):
#     def __new__(cls, name, bases, dct):
#     def __new__(cls, name, bases, dct):
#     def __init__(self, *args, **kwargs):
#     def __getitem__(self, key: Union[KT, int]) -> VT:
#     def __getstate__(self):
#     def __setitem__(self, key: KT, value: VT) -> None:
#     def __copy__(self):
#     def copy(self):
#     def __get_validators__(cls):
#     def _validate_whole(cls, v, field: pydantic.fields.ModelField):
#     def _validate_entry(self, key, value):
#     def compare(self, other, strict=True):
# def dictlike_field():
# def summarize_dictlike(dl, maxwidth=72):
# def validate_dictlike(cls):
# def compare(attr, a, b, strict: bool) -> bool:
# def only(iterator: Iterator) -> Any:
# def parse_content_type(value: str) -> Tuple[str, Dict[str, Any]]:
# def direct_fields(cls) -> Mapping[str, pydantic.fields.ModelField]:
#     def get_args(tp) -> Tuple[Any, ...]:


import logging
            import pandasdmx.urn
from collections import ChainMap
from collections.abc import Collection
from collections.abc import Iterable as IterableABC
from copy import copy
from datetime import date, datetime, timedelta
from enum import Enum
from functools import lru_cache
from inspect import isclass
from itertools import product
from operator import attrgetter, itemgetter
from typing import (
    Any,
    Dict,
    Generator,
    Generic,
    Iterable,
    List,
    Mapping,
    Optional,
    Sequence,
    Set,
    Tuple,
    Type,
    TypeVar,
    Union,
)
from warnings import warn
from pandasdmx.util import (
    BaseModel,
    DictLike,
    compare,
    dictlike_field,
    only,
    Resource,
    validate_dictlike,
    validator,
)

    #: Universal resource name. For use in SDMX registries; all registered
    #: objects have a URN.
    urn: Optional[str] = None

    urn_group: Dict = dict()

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        if self.urn and DEFAULT_VAL_LEVEL == ValidationLevels.strict:

            self.urn_group = pandasdmx.urn.match(self.urn)

        try:
            if self.id not in (self.urn_group["item_id"] or self.urn_group["id"]):
                raise ValueError(f"ID {self.id} does not match URN {self.urn}")
        except KeyError:
            pass

    def __eq__(self, other):
        """Equality comparison.

        IdentifiableArtefacts can be compared to other instances. For convenience, a
        string containing the object's ID is also equal to the object.
        """
        if isinstance(other, self.__class__):
            return self.id == other.id
        elif isinstance(other, str):
            return self.id == other


# Path: pandasdmx/util.py
#     HAS_REQUESTS_CACHE = False
#     HAS_REQUESTS_CACHE = True
# KT = TypeVar("KT")
# VT = TypeVar("VT")
# CLASS_NAME = {
#     "dataflow": "DataflowDefinition",
#     "datastructure": "DataStructureDefinition",
# }
# VALUE = {v: k for k, v in CLASS_NAME.items()}
# RESPONSE_CODE = {
#     200: "OK",
#     304: "No changes",
#     400: "Bad syntax",
#     401: "Unauthorized",
#     403: "Semantic error",  # or "Forbidden"
#     404: "Not found",
#     406: "Not acceptable",
#     413: "Request entity too large",
#     414: "URI too long",
#     500: "Internal server error",
#     501: "Not implemented",
#     503: "Unavailable",
# }
# KT = TypeVar("KT")
# VT = TypeVar("VT")
# class Resource(str, Enum):
# class BaseModel(pydantic.BaseModel):
#     class Config:
# class MaybeCachedSession(type):
# class BaseModel(pydantic.BaseModel):
#     class Config:
# class MaybeCachedSession(type):
# class DictLike(dict, typing.MutableMapping[KT, VT]):
#     def from_obj(cls, obj):
#     def class_name(cls, value: "Resource", default=None) -> str:
#     def describe(cls):
#     def __new__(cls, name, bases, dct):
#     def __new__(cls, name, bases, dct):
#     def __init__(self, *args, **kwargs):
#     def __getitem__(self, key: Union[KT, int]) -> VT:
#     def __getstate__(self):
#     def __setitem__(self, key: KT, value: VT) -> None:
#     def __copy__(self):
#     def copy(self):
#     def __get_validators__(cls):
#     def _validate_whole(cls, v, field: pydantic.fields.ModelField):
#     def _validate_entry(self, key, value):
#     def compare(self, other, strict=True):
# def dictlike_field():
# def summarize_dictlike(dl, maxwidth=72):
# def validate_dictlike(cls):
# def compare(attr, a, b, strict: bool) -> bool:
# def only(iterator: Iterator) -> Any:
# def parse_content_type(value: str) -> Tuple[str, Dict[str, Any]]:
# def direct_fields(cls) -> Mapping[str, pydantic.fields.ModelField]:
#     def get_args(tp) -> Tuple[Any, ...]:


# Path: pandasdmx/model.py
import logging
            import pandasdmx.urn
from collections import ChainMap
from collections.abc import Collection
from collections.abc import Iterable as IterableABC
from copy import copy
from datetime import date, datetime, timedelta
from enum import Enum
from functools import lru_cache
from inspect import isclass
from itertools import product
from operator import attrgetter, itemgetter
from typing import (
    Any,
    Dict,
    Generator,
    Generic,
    Iterable,
    List,
    Mapping,
    Optional,
    Sequence,
    Set,
    Tuple,
    Type,
    TypeVar,
    Union,
)
from warnings import warn
from pandasdmx.util import (
    BaseModel,
    DictLike,
    compare,
    dictlike_field,
    only,
    Resource,
    validate_dictlike,
    validator,
)

    #: Universal resource name. For use in SDMX registries; all registered
    #: objects have a URN.
    urn: Optional[str] = None

    urn_group: Dict = dict()

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        if self.urn and DEFAULT_VAL_LEVEL == ValidationLevels.strict:

            self.urn_group = pandasdmx.urn.match(self.urn)

        try:
            if self.id not in (self.urn_group["item_id"] or self.urn_group["id"]):
                raise ValueError(f"ID {self.id} does not match URN {self.urn}")
        except KeyError:
            pass

    def __eq__(self, other):
        """Equality comparison.

        IdentifiableArtefacts can be compared to other instances. For convenience, a
        string containing the object's ID is also equal to the object.
        """
        if isinstance(other, self.__class__):
            return self.id == other.id
        elif isinstance(other, str):
            return self.id == other


    def compare(self, other, strict=True):
