def METHOD_NAME(addr):
    hrp = addr[:4]
    self.assertEqual(hrp, "bcrt")
    (witver, witprog) = decode_segwit_address(hrp, addr)
    self.assertEqual(encode_segwit_address(hrp, witver, witprog), addr)