code: def frame_and_lineno(
      frame_or_tb: Union[FrameType, TracebackType]
  ) -> Tuple[FrameType, int]:
      if is_frame(frame_or_tb):
          return frame_or_tb, frame_or_tb.f_lineno
      else:
          return frame_or_tb.tb_frame, frame_or_tb.tb_lineno
  
imports: import ast
  import itertools
  import types
  from collections import OrderedDict, Counter, defaultdict
  from types import FrameType, TracebackType
  from typing import Iterator, List, Tuple, Iterable, Callable, Union, TypeVar, Mapping
  from asttokens import ASTText
label_desc: Use image node_id 9 for calling a global function with example usage: frame_and_lineno(frame_or_tb) and returns: frame_or_tb,  frame_or_tb, frame_or_tb,  frame_or_tb