def METHOD_NAME(self, app, last_dim, args):
    inputs = keras.layers.Input(shape=(224, 224, 3))
    backbone = app(
        include_rescaling=False,
        include_top=False,
        input_tensor=inputs,
        pooling="avg",
        **args
    )
    x = inputs
    x = backbone(x)
    backbone_output = backbone.get_layer(index=-1).output
    model = keras.Model(inputs=inputs, outputs=[backbone_output])
    model.compile()