I don't know what the problem is

My code is this

@Subroutine(TealType.uint64)
def code():
    return Seq([
        Assert(And(Gtxn[0].asset_receiver() == Global.current_application_address(), Gtxn[0].asset_amount() > Int(0), Gtxn[1].amount() == Int(1), Gtxn[1].receiver() == Global.current_application_address())),
        
        Approve()
    ])


def contract_functions():
    return Cond(
        [Global.current_application_id() == Int(0), Approve()],
        [Global.group_size() == Int(3), code()],
    )

this produces the error pyteal.TealTypeError: TealType.uint64 while expected TealType.none

from pyteal import *

@Subroutine(TealType.uint64)
def code():
    return Seq([
        Assert(And(
            Gtxn[0].asset_receiver() == Global.current_application_address(), 
            Gtxn[0].asset_amount() > Int(0), 
            Gtxn[1].amount() == Int(1), 
            Gtxn[1].receiver() == Global.current_application_address())
        ),
        Int(1)
    ])

def contract_functions():
    return Cond(
        [Global.current_application_id() == Int(0), Int(1)],
        [Global.group_size() == Int(3), code()],
        [Global.group_size() == Int(5), code()],
    )

if __name__ == "__main__":
    with open('bmb_contract.teal', 'w') as f:
        compiled = compileTeal(contract_functions(), mode=Mode.Signature, version=6)
        f.write(compiled)

In Cond, all bodys must have the same types.
Generated teal code seems to be OK:

#pragma version 6
global CurrentApplicationID
int 0
==
bnz main_l6
global GroupSize
int 3
==
bnz main_l5
global GroupSize
int 5
==
bnz main_l4
err
main_l4:
callsub code_0
b main_l7
main_l5:
callsub code_0
b main_l7
main_l6:
int 1
main_l7:
return

// code
code_0:
gtxn 0 AssetReceiver
global CurrentApplicationAddress
==
gtxn 0 AssetAmount
int 0
>
&&
gtxn 1 Amount
int 1
==
&&
gtxn 1 Receiver
global CurrentApplicationAddress
==
&&
assert
int 1
retsub