code: def _external_stacklevel(internal):
      """Find the stacklevel of the first frame that doesn't contain any of the given internal strings
  
      The depth will be 1 at minimum in order to start checking at the caller of
      the function that called this utility method.
      """
      # Get the level of my caller's caller
      level = 2
      frame = _get_frame(level)
  
      # Normalize the path separators:
      normalized_internal = [str(Path(s)) for s in internal]
  
      # climb the stack frames while we see internal frames
      while frame and any(
          s in str(Path(frame.f_code.co_filename))
          for s in normalized_internal
      ):
          level += 1
          frame = frame.f_back
  
      # Return the stack level from the perspective of whoever called us (i.e., one level up)
      return level - 1
  
imports: from pathlib import Path
  import sys
  import inspect
  import warnings
label_desc: Use image node_id 2 for calling a global function with example usage: _external_stacklevel(internal) and returns: unknown