The error is raised, since train_model doesn’t return anything, so you might want to add a return statement. This code snippet raises the same error:
def fun():
    print("don't return anything")

fun() # works
a, b = fun() # fails
> TypeError: cannot unpack non-iterable NoneType object