def _get_address(self, purpose, account=0, external=True, address=0):
    "Returns the proper address among purposes 44', 49' and 84'.\n        p2pkh for 44', p2sh-p2wpkh for 49' and p2wpkh for 84'."
    if (purpose not in ("44'", "49'", "84'")):
        raise ValueError('Cannot create an address without a proper purpose: {}'.format(purpose))
    if self.testnet:
        coin = "1'"
    else:
        coin = "0'"
    if external:
        chain = '0'
    else:
        chain = '1'
    path = "m/{}/{}/{}'/{}/{}".format(purpose, coin, account, chain, address)
    hd_priv = self.traverse(path)
    if (purpose == "44'"):
        return hd_priv.address()
    elif (purpose == "49'"):
        return hd_priv.p2sh_p2wpkh_address()
    elif (purpose == "84'"):
        return hd_priv.bech32_address()
Returns the proper address among purposes 44', 49' and 84'.
p2pkh for 44', p2sh-p2wpkh for 49' and p2wpkh for 84'.
def _get_address(self, purpose, account=0, external=True, address=0):
    "Returns the proper address among purposes 44', 49' and 84'.\n        p2pkh for 44', p2sh-p2wpkh for 49' and p2wpkh for 84'."
    if (purpose not in ("44'", "49'", "84'")):
        raise ValueError('Cannot create an address without a proper purpose: {}'.format(purpose))
    if self.testnet:
        coin = "1'"
    else:
        coin = "0'"
    if external:
        chain = '0'
    else:
        chain = '1'
    path = "m/{}/{}/{}'/{}/{}".format(purpose, coin, account, chain, address)
    hd_priv = self.traverse(path)
    if (purpose == "44'"):
        return hd_priv.address()
    elif (purpose == "49'"):
        return hd_priv.p2sh_p2wpkh_address()
    elif (purpose == "84'"):
        return hd_priv.bech32_address()