Your constructor expects arguments modelA, modelB and nb_classes. But since, you have defined a default value for nb_classes = 10 in the __init__ method of MyEnsemble, it will work even if you haven’t passed, the value for nb_classes. But modelA and modelB needs to be defined for object creation.
You code should look like:-
m = get_model()

def get_model():
    model = MyEnsemble(modelA = some_model, modelB = some_model, nb_classes = can_skip_passing_but_a_good_practice_to_do_so)`

    ....do_whatever_you_want