# Path: mimesis/builtins/base.py
# class BaseSpecProvider(BaseDataProvider):
#     """Base provider for specific data providers."""
# 
#     def __init__(self, *args: Any, **kwargs: Any) -> None:
#         """Initialize attributes of superclass."""
#         super().__init__(*args, **kwargs)
#         self._datafile = "builtin.json"
# 
# Path: mimesis/types.py
# JSON = Dict[str, Any]


from typing import Final, Optional
from mimesis.builtins.base import BaseSpecProvider
from mimesis.enums import Gender
from mimesis.locales import Locale
from mimesis.providers import Datetime
from mimesis.types import DateTime, Seed

class PolandSpecProvider(BaseSpecProvider):
    """Class that provides special data for Poland (pl)."""

    def __init__(self, seed: Seed = None) -> None:
        """Initialize attributes."""
        super().__init__(locale=Locale.PL, seed=seed)

    class Meta:
        """The name of the provider."""

        name: Final[str] = "poland_provider"

    def nip(self) -> str:
        """Generate random valid 10-digit NIP.

        :return: Valid 10-digit NIP
        """
        nip_digits = [int(d) for d in str(self.random.randint(101, 998))]
        nip_digits += [self.random.randint(0, 9) for _ in range(6)]
        nip_coefficients = (6, 5, 7, 2, 3, 4, 5, 6, 7)
        sum_v = sum(nc * nd for nc, nd in zip(nip_coefficients, nip_digits))

        checksum_digit = sum_v % 11
        if checksum_digit > 9:
            return self.nip()
        nip_digits.append(checksum_digit)
        return "".join(map(str, nip_digits))

    def pesel(

# Path: mimesis/builtins/base.py
# class BaseSpecProvider(BaseDataProvider):
#     """Base provider for specific data providers."""
# 
#     def __init__(self, *args: Any, **kwargs: Any) -> None:
#         """Initialize attributes of superclass."""
#         super().__init__(*args, **kwargs)
#         self._datafile = "builtin.json"
# 
# Path: mimesis/types.py
# JSON = Dict[str, Any]


# Path: mimesis/builtins/pl.py
from typing import Final, Optional
from mimesis.builtins.base import BaseSpecProvider
from mimesis.enums import Gender
from mimesis.locales import Locale
from mimesis.providers import Datetime
from mimesis.types import DateTime, Seed


class PolandSpecProvider(BaseSpecProvider):
    """Class that provides special data for Poland (pl)."""

    def __init__(self, seed: Seed = None) -> None:
        """Initialize attributes."""
        super().__init__(locale=Locale.PL, seed=seed)

    class Meta:
        """The name of the provider."""

        name: Final[str] = "poland_provider"

    def nip(self) -> str:
        """Generate random valid 10-digit NIP.

        :return: Valid 10-digit NIP
        """
        nip_digits = [int(d) for d in str(self.random.randint(101, 998))]
        nip_digits += [self.random.randint(0, 9) for _ in range(6)]
        nip_coefficients = (6, 5, 7, 2, 3, 4, 5, 6, 7)
        sum_v = sum(nc * nd for nc, nd in zip(nip_coefficients, nip_digits))

        checksum_digit = sum_v % 11
        if checksum_digit > 9:
            return self.nip()
        nip_digits.append(checksum_digit)
        return "".join(map(str, nip_digits))

    def pesel(

        self, birth_date: Optional[DateTime] = None, gender: Optional[Gender] = None