def _default_model_callback(model: BaseModel, **kwargs) -> BaseModel: # we could filter kwargs, but it's better not to - this will detect if we pass useless stuff return model.prepare(**kwargs)
def cb(model: BaseModel, *_args, **_kwargs): model._lineage = "bar" return model
def cb2(model: BaseModel, *args, **kwargs): return model.prepare(*args, **kwargs)
def cb(model: BaseModel, *_args, **_kwargs): model._gene = "bar" return model