Generate EAN.

        To change EAN format, pass parameter ``fmt`` with needed value of
        the enum object :class:`~mimesis.enums.EANFormat`.

        :param fmt: Format of EAN.
        :return: EAN.
        :raises NonEnumerableError: if fmt is not enum EANFormat.

def ean(self, fmt: Optional[EANFormat] = None) -> str:
        """Generate EAN.

        To change EAN format, pass parameter ``fmt`` with needed value of
        the enum object :class:`~mimesis.enums.EANFormat`.

        :param fmt: Format of EAN.
        :return: EAN.
        :raises NonEnumerableError: if fmt is not enum EANFormat.
        """
        key = self._validate_enum(
            item=fmt,
            enum=EANFormat,
        )
        mask = EAN_MASKS[key]
        return self.random.custom_code(mask=mask)