code: def _f_lineno(frame: FrameType) -> int:
      """Work around some frames lacking an f_lineno
      See: https://bugs.python.org/issue47085
      """
      f_lineno = frame.f_lineno
      if f_lineno is not None:
          return f_lineno
  
      f_lasti = frame.f_lasti
      code = frame.f_code
      try:
          prev_line = code.co_firstlineno
  
          for start, next_line in dis.findlinestarts(code):
              if f_lasti < start:
                  return prev_line
              prev_line = next_line
  
          return prev_line
      except Exception:
          return -1
  
imports: from __future__ import annotations
  import bisect
  import dis
  import linecache
  import sys
  import threading
  from collections import defaultdict, deque
  from collections.abc import Callable, Collection
  from time import sleep
  from types import FrameType
  from typing import Any
  import tlz
  import dask.config
  from dask.typing import NoDefault, no_default
  from dask.utils import format_time, parse_timedelta
  from distributed.metrics import time
  from distributed.utils import color_of
label_desc: Use image node_id 2 for calling a global function with example usage: _f_lineno(frame) and returns: f_lineno, prev_line, unknown, prev_line