name_to_register = "" #.algo name to register
address = "" # owner's algorand wallet address
period = 0 # duration of registration
name_registration_txns = sdk.name(name_to_register).register(address, period)
# Returns a tuple of size two
# name_registration_txns[0] includes the array of transactions
# name_registration_txns[1] has the logic sig
if(len(name_registration_txns[0]) == 2):
# Lsig account previous opted in (name expired)
elif(len(name_registration_txns[0]) == 4):
# name_registration_txns[2] must be signed by the sdk
# Sign name_registration_txns index 0,1,3
# Submit transactions as a group
signed_group_txns[2], # must be signed by the sdk