code: def test_from_file_finetuning(self):
      test_driver = get_initialised_driver(
          40, False, ".*conv_bn_selu/.*conv_.*"
      )
      expected_init = np.array(
          [
              [
                  -0.23192197,
                  0.60880029,
                  -0.24921742,
                  -0.00186354,
                  -0.3345384,
                  0.16067748,
                  -0.2210995,
                  -0.19460233,
                  -0.3035436,
                  -0.42839912,
                  -0.0489039,
                  -0.90753943,
                  -0.12664583,
                  -0.23129687,
                  0.01584663,
                  -0.43854219,
                  0.40412974,
                  0.0396539,
                  -0.1590578,
                  -0.53759819,
              ]
          ],
          dtype=np.float32,
      )
      graph = test_driver.create_graph(test_driver.app, 1, True)
      with self.cached_session(graph=graph) as sess:
          test_tensor = graph.get_tensor_by_name(
              "G/conv_bn_selu/conv_/w:0"
          )
          test_negative_tensor = graph.get_tensor_by_name(
              "D/conv_relu/conv_/b:0"
          )
          with self.assertRaisesRegexp(
              tf.errors.FailedPreconditionError, "uninitialized value"
          ):
              _ = sess.run(test_tensor)
          ModelRestorer(**vars(test_driver)).restore_model(None)
          after_init = sess.run(test_tensor)
          after_init_negative = sess.run(test_negative_tensor)
          self.assertAllClose(after_init[0], expected_init)
          # the not matched should be initialised using default initializer
          self.assertEqual(np.any(after_init_negative), False)
          _ = sess.run(tf.global_variables())
          bad_init = sess.run(tf.report_uninitialized_variables())
          self.assertEqual(bad_init.size, 0)
  
imports: from __future__ import absolute_import, print_function
  import os
  import uuid
  import numpy
  import tensorflow
  from niftynet.engine.application_driver import ApplicationDriver
  from niftynet.engine.application_variables import global_vars_init_or_restore
  from niftynet.engine.handler_model import ModelRestorer
  from niftynet.io.misc_io import set_logger
  from niftynet.utilities.util_common import ParserNamespace
  from niftynet.engine.signal import SESS_FINISHED, SESS_STARTED
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 10 for calling the ApplicationDriverTest obj's underlying member method code with example usage: obj.test_from_file_finetuning() without return types