def METHOD_NAME(bc32: str) -> bytes:
    """
    bc32 decoding
    see https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-004-bc32.md
    """
    if bc32.lower() != bc32 and bc32.upper() != bc32:
        return None
    bc32 = bc32.lower()
    if not all([x in CHARSET for x in bc32]):
        return None
    res = [CHARSET.find(c) for c in bc32.lower()]
    if bech32_polymod([0] + res) != 0x3FFFFFFF:
        return None
    return bytes(convertbits(res[:-6], 5, 8, False))