### Question:
Session implements AutoCloseable { public void save(String prefix) { SaverDef saverDef = graph.saverDef(); runner() .addTarget(saverDef.getSaveTensorName()) .feed(saverDef.getFilenameTensorName(), TString.scalarOf(prefix)) .run(); } Session(Graph g);  Session(Graph g, ConfigProto config);   Session(Graph g, TF_Session nativeHandle); @Override void close(); Runner runner(); void run(String opName); void run(Op op); void save(String prefix);  }### Answer:
@Test public void save() throws IOException { Path testFolder = Files.createTempDirectory("tf-session-save-test"); try (Graph g = new Graph()) { Ops tf = Ops.create(g); Variable<TFloat32> x = tf.variable(tf.random.randomUniform(tf.constant(Shape.of(3, 3L)), TFloat32.DTYPE)); Variable<TFloat32> y = tf.variable(tf.random.randomUniform(tf.constant(Shape.of(3, 3L)), TFloat32.DTYPE)); Init init = tf.init(); try (Session s = new Session(g)) { s.run(init); s.save(testFolder.resolve("checkpoint").toString()); } } assertTrue(Files.exists(testFolder.resolve("checkpoint.index"))); assertTrue(Files.exists(testFolder.resolve("checkpoint.data-00000-of-00001"))); }