code: def strip_scope(scope, transfer_learning_type, str_signature):
      """Strips signature from the scope if uniform average transfer learning.
  
      If we are warm starting the tower with the average values of the previous
      trials, do not append the signature to the scope as this will cause a mismatch
      when searching via mutation.
  
      Args:
        scope: The scope to potentially strip.
        transfer_learning_type: The current transfer learning type.
        str_signature: The scope signature to strip from the scope.
  
      Returns:
        Either the original scope or the stripped scope.
      """
      if (
          transfer_learning_type
          == transfer_learning_spec_pb2.TransferLearningSpec.UNIFORM_AVERAGE_TRANSFER_LEARNING
      ):
          scope = scope[: -(len(str_signature) + 1)]
      return scope
  
imports: import collections
  import os
  import string
  import time
  from absl import flags
  from absl import logging
  from model_search import block
  from model_search import block_builder
  from model_search import hparam
  from model_search import utils
  from model_search.proto import hparam_pb2
  from model_search.proto import phoenix_spec_pb2
  from model_search.proto import transfer_learning_spec_pb2
  import numpy
  import tensorflow.compat.v2
  import tf_slim
  from google.protobuf import text_format
label_desc: Use image node_id 15 for calling a global function with example usage: strip_scope(scope, transfer_learning_type, str_signature) and returns: scope