code: def remove_head(original_stem, name):
      _scope = "%s/stem" % tf.get_variable_scope().name
      g = tf.get_default_graph()
      for x in g.get_collection(
          tf.GraphKeys.GLOBAL_VARIABLES, scope=_scope + "/"
      )[::-1]:
          if name in x.name:
              break
          g.get_collection_ref(tf.GraphKeys.GLOBAL_VARIABLES).pop()
  
      for x in g.get_collection(__outputs__, scope=_scope + "/")[::-1]:
          if name in x.name:
              break
          g.get_collection_ref(__outputs__).pop()
      x.model_name = original_stem.model_name
      return x
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  import warnings
  from contextlib import contextmanager
  from .version_utils import tf_later_than
label_desc: Use image node_id 27 for calling a global function with example usage: remove_head(original_stem, name) and returns: x