code: def _extract_code_globals(co):
      """
      Find all globals names read or written to by codeblock co
      """
      out_names = _extract_code_globals_cache.get(co)
      if out_names is None:
          names = co.co_names
          out_names = {
              names[oparg] for _, oparg in _walk_global_ops(co)
          }
  
          # Declaring a function inside another one using the "def ..."
          # syntax generates a constant code object corresonding to the one
          # of the nested function's As the nested function may itself need
          # global variables, we need to introspect its code, extract its
          # globals, (look for code object in it's co_consts attribute..) and
          # add the result to code_globals
          if co.co_consts:
              for const in co.co_consts:
                  if isinstance(const, types.CodeType):
                      out_names |= _extract_code_globals(const)
  
          _extract_code_globals_cache[co] = out_names
  
      return out_names
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import builtins
  import dis
  import opcode
  import platform
  import sys
  import types
  import weakref
  import uuid
  import threading
  import typing
  import warnings
  from ._compat import pickle
  from typing import Generic, Union, Tuple, Callable
  from pickle import _getattribute
  from importlib._bootstrap import _find_spec
label_desc: Use image node_id 6 for calling a global function with example usage: _extract_code_globals(co) and returns: out_names