code: def user_frames(source_info: SourceInfo) -> Iterator[Frame]:
      """Iterator over the user's frames, filtering jax-internal frames."""
      # Guess the user's frame is the innermost frame not in the jax source tree or
      # Python stdlib. We don't use traceback_util.path_starts_with because that
      # incurs filesystem access, which may be slow; we call this function when
      # e.g. adding source provenance annotations to XLA lowerings, so we don't
      # want to incur the cost. We consider files that end with _test.py as user
      # frames, to allow testing this mechanism from tests.
      traceback = source_info.traceback
      code, lasti = traceback.raw_frames() if traceback else ([], [])
      return (
          raw_frame_to_frame(code[i], lasti[i])
          for i in range(len(code))  # type: ignore
          if is_user_filename(code[i].co_filename)
      )
  
imports: from __future__ import annotations
  from collections.abc import Iterator
  import contextlib
  import dataclasses
  import functools
  import itertools
  import os.path
  import sys
  import sysconfig
  import threading
  import types
  from typing import NamedTuple
  import jax.version
  from jax._src.lib import xla_client
  from jax._src import traceback_util
label_desc: Use image node_id 6 for calling a global function with example usage: user_frames(source_info) and returns: unknown