code: def lines_with_profiling(lines, print_function_profile=False):
      """Inject profiling code into the given lines of code."""
      cleaned_lines = "\n".join(
          [(" " * 4) + line.replace("\t", " " * 4) for line in lines]
      )
      return _profile_injection_text.format(
          original_lines=cleaned_lines,
          function_profile_printer="profiler.print_per_function_stats()"
          if print_function_profile
          else "",
      )
  
imports: import inspect
  import operator
  import pickle
  import sys
  import time
  from collections import defaultdict
  from typing import Union
  from rich.console import Console
  from rich.syntax import Syntax
  from rich.table import Table
  from .fast_slow_proxy import _FinalProxy, _FunctionProxy, _IntermediateProxy, _MethodProxy
label_desc: Use image node_id 2 for calling a global function with example usage: lines_with_profiling(lines, print_function_profile) and returns: _profile_injection_text