@staticmethod
def master_key_from_entropy(passphrase='', strength=128):
    ' Generates a master key from system entropy.\n\n        Args:\n            strength (int): Amount of entropy desired. This should be\n               a multiple of 32 between 128 and 256.\n            passphrase (str): An optional passphrase for the generated\n               mnemonic string.\n\n        Returns:\n            HDPrivateKey, str:\n                a tuple consisting of the master\n                private key and a mnemonic string from which the seed\n                can be recovered.\n        '
    if ((strength % 32) != 0):
        raise ValueError('strength must be a multiple of 32')
    if ((strength < 128) or (strength > 256)):
        raise ValueError('strength should be >= 128 and <= 256')
    entropy = os.urandom((strength // 8))
    m = Mnemonic(language='english')
    n = m.to_mnemonic(entropy)
    return (HDPrivateKey.master_key_from_seed(Mnemonic.to_seed(n, passphrase)), n)
Generates a master key from system entropy.

Args:
    strength (int): Amount of entropy desired. This should be
       a multiple of 32 between 128 and 256.
    passphrase (str): An optional passphrase for the generated
       mnemonic string.

Returns:
    HDPrivateKey, str:
        a tuple consisting of the master
        private key and a mnemonic string from which the seed
        can be recovered.
@staticmethod
def master_key_from_entropy(passphrase=, strength=128):
    ' Generates a master key from system entropy.\n\n        Args:\n            strength (int): Amount of entropy desired. This should be\n               a multiple of 32 between 128 and 256.\n            passphrase (str): An optional passphrase for the generated\n               mnemonic string.\n\n        Returns:\n            HDPrivateKey, str:\n                a tuple consisting of the master\n                private key and a mnemonic string from which the seed\n                can be recovered.\n        '
    if ((strength % 32) != 0):
        raise ValueError('strength must be a multiple of 32')
    if ((strength < 128) or (strength > 256)):
        raise ValueError('strength should be >= 128 and <= 256')
    entropy = os.urandom((strength // 8))
    m = Mnemonic(language='english')
    n = m.to_mnemonic(entropy)
    return (HDPrivateKey.master_key_from_seed(Mnemonic.to_seed(n, passphrase)), n)