code: def demonstrate_loading_two_instances_of_model1():
      print(
          "=" * 60
          + " Demonstrate loading weights from model1 into two instances of model1 in scopeA and scopeB"
      )
      tf.reset_default_graph()
      with tf.variable_scope("scopeA") as scope:
          m1a = Model1()
          print(
              "-" * 40 + " Trying to load model1 weights: should fail"
          )
          try:
              m1a.model.load("model1.tfl", weights_only=True)
          except Exception as err:
              print(
                  "Loading failed, with error as expected, because variables are in scopeA"
              )
              print("error: %s" % str(err))
          print("-" * 40)
  
          print(
              "=" * 60
              + " Trying to load model1 weights: should succeed"
          )
          m1a.model.load(
              "model1.tfl",
              scope_for_restore="scopeA",
              verbose=True,
              weights_only=True,
          )
  
      with tf.variable_scope("scopeB") as scope:
          m1b = Model1()
          m1b.model.load(
              "model1.tfl",
              scope_for_restore="scopeB",
              verbose=True,
              weights_only=True,
          )
      print(
          "=" * 60
          + " Successfully restored weights to two instances of model1, in different scopes"
      )
  
imports: from __future__ import division, print_function, absolute_import
  import re
  import tflearn
  import tensorflow.compat.v1
  import tflearn.datasets.mnist
  from tflearn.layers.core import input_data, dropout, fully_connected
  from tflearn.layers.conv import conv_2d, max_pool_2d
  from tflearn.layers.normalization import local_response_normalization
  from tflearn.layers.estimator import regression
label_desc: Use image node_id 6 for calling a global function with example usage: demonstrate_loading_two_instances_of_model1() without return types