def METHOD_NAME(model):
  tmpdir = tempfile.mkdtemp()
  tf.keras.models.save_model(model, tmpdir, save_format='tf')
  with prune.prune_scope():
    loaded_model = tf.keras.models.load_model(tmpdir)
  return loaded_model