def __init__(self, phrase_or_hex="<STR_LIT>", wordlist="<STR_LIT>"):
self.phrase = "<STR_LIT>" <EOL>self.hex = "<STR_LIT>" <EOL>self.word_list = wordlists.get_wordlist(wordlist)<EOL>self._ed_pub_spend_key = None<EOL>self._ed_pub_view_key = None<EOL>if phrase_or_hex:<EOL><INDENT>seed_split = phrase_or_hex.split("<STR_LIT:U+0020>")<EOL>if len(seed_split) >= <NUM_LIT>:<EOL><INDENT>self.phrase = phrase_or_hex<EOL>if len(seed_split) == <NUM_LIT>:<EOL><INDENT>self._validate_checksum()<EOL><DEDENT>self._decode_seed()<EOL><DEDENT>elif len(seed_split) >= <NUM_LIT:12>:<EOL><INDENT>self.phrase = phrase_or_hex<EOL>if len(seed_split) == <NUM_LIT>:<EOL><INDENT>self._validate_checksum()<EOL><DEDENT>self._decode_seed()<EOL><DEDENT>elif len(seed_split) == <NUM_LIT:1>:<EOL><INDENT>if not len(phrase_or_hex) % <NUM_LIT:8> == <NUM_LIT:0>:<EOL><INDENT>raise ValueError("<STR_LIT>".format(hex=phrase_or_hex))<EOL><DEDENT>self.hex = phrase_or_hex<EOL>self._encode_seed()<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>".format(arg=phrase_or_hex))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.hex = generate_hex()<EOL>self._encode_seed()<EOL><DEDENT>
If user supplied a seed string to the class, break it down and determine
        if it's hexadecimal or mnemonic word string. Gather the values and store them.
        If no seed is passed, automatically generate a new one from local system randomness.

        :rtype: :class:`Seed <monero.seed.Seed>`