code: def print_global_stats():
      """
      Print the following stats:
        -- Time elapsed since PyTensor was imported
        -- Time spent inside PyTensor functions
        -- Time spent in compiling PyTensor functions
             -- on graph rewriters
             -- on linker
      """
  
      if config.profiling__destination == "stderr":
          destination_file = "<stderr>"
      elif config.profiling__destination == "stdout":
          destination_file = "<stdout>"
      else:
          destination_file = config.profiling__destination
  
      with extended_open(destination_file, mode="w"):
          print("=" * 50, file=destination_file)
          print(
              (
                  "Global stats: ",
                  f"Time elapsed since PyTensor import = {time.perf_counter() - pytensor_imported_time:6.3f}s, "
                  f"Time spent in PyTensor functions = {total_fct_exec_time:6.3f}s, "
                  "Time spent compiling PyTensor functions: "
                  f"rewriting = {total_graph_rewrite_time:6.3f}s, linking = {total_time_linker:6.3f}s ",
              ),
              file=destination_file,
          )
          print("=" * 50, file=destination_file)
  
imports: import atexit
  import copy
  import logging
  import operator
  import sys
  import time
  from collections import defaultdict
  from contextlib import contextmanager
  from typing import TYPE_CHECKING, Any, Optional, Union
  import numpy
  import pytensor
  from pytensor.configdefaults import config
  from pytensor.graph.basic import Apply, Constant, Variable
  from pytensor.link.utils import get_destroy_dependencies
label_desc: Use image node_id 3 for calling a global function with example usage: print_global_stats() without return types