def METHOD_NAME():
    tf.keras.backend.clear_session()
    with tf.compat.v1.keras.backend.get_session() as sess:
        fn = tf.wrap_function(trace_model, signature=[tf.TensorSpec((None, input_shape[0], input_shape[1],
                                                                     input_shape[2]), tf.float32)])
        train_fn = fn.prune(feeds=fn.inputs[0], fetches=fn.outputs[0])
        obj = tf.Module()
        obj.variables_list = list(fn.graph.variables)
        sess.run(tf.compat.v1.global_variables_initializer())
        tf.saved_model.save(obj, saving_path, {'train': train_fn, 'serving_default': train_fn})