Create hash of the class.

        Hash should be unique for given ebook, so ISBN is main component of the
        hash if provided.

        Returns:
            str: Hash.

def _get_hash(self):
        """
        Create hash of the class.

        Hash should be unique for given ebook, so ISBN is main component of the
        hash if provided.

        Returns:
            str: Hash.
        """
        if self.optionals and self.optionals.ISBN:
            isbn = self.optionals.ISBN.replace("-", "")

            if len(isbn) <= 10:
                return "97880" + isbn

            return isbn

        if self.optionals and self.optionals.EAN:
            return self.optionals.EAN

        return self.title + ",".join(map(lambda x: x.name, self.authors))