code: def _get_shared_cnt():
      global _shared_cnt_counter
  
      with _module_lock:
          val = _shared_cnt_counter
          _shared_cnt_counter += 1
      return val
  
imports: import operator
  from contextlib import contextmanager
  import tensorflow
  import threading
  from ..compat import tfv1
  from ..tfutils.common import get_tf_version_tuple
  from ..tfutils.scope_utils import cached_name_scope, under_name_scope
  from ..tfutils.varreplace import custom_getter_scope
  from ..utils import logger
  from ..utils.argtools import call_only_once
label_desc: Use image node_id 2 for calling a global function with example usage: _get_shared_cnt() and returns: val