code: def profile_ends():
      global _END_TIME
      _END_TIME = time.time()
      profile_total_time = _END_TIME - _START_TIME
  
      # gather computing and federation profile statistics
      timer_aggregator = _TimerItem()
      computing_timer_aggregator = _TimerItem()
      federation_timer_aggregator = _TimerItem()
      (
          computing_base_table,
          computing_detailed_table,
      ) = _ComputingTimer.computing_statistics_table(
          timer_aggregator=computing_timer_aggregator
      )
      federation_base_table = (
          _FederationTimer.federation_statistics_table(
              timer_aggregator=federation_timer_aggregator
          )
      )
      timer_aggregator.union(computing_timer_aggregator)
      timer_aggregator.union(federation_timer_aggregator)
  
      # logging
      profile_driver_time = (
          profile_total_time - timer_aggregator.total_time
      )
      profile_logger.info(
          "Total: {:.4f}s, Driver: {:.4f}s({:.2%}), Federation: {:.4f}s({:.2%}), Computing: {:.4f}s({:.2%})".format(
              profile_total_time,
              profile_driver_time,
              profile_driver_time / profile_total_time,
              federation_timer_aggregator.total_time,
              federation_timer_aggregator.total_time
              / profile_total_time,
              computing_timer_aggregator.total_time,
              computing_timer_aggregator.total_time
              / profile_total_time,
          )
      )
      profile_logger.info(
          f"\nComputing:\n{computing_base_table}\n\nFederation:\n{federation_base_table}\n"
      )
      profile_logger.debug(
          f"\nDetailed Computing:\n{computing_detailed_table}\n"
      )
  
      global _PROFILE_LOG_ENABLED
      _PROFILE_LOG_ENABLED = False
  
imports: import hashlib
  import inspect
  import logging
  import time
  import typing
  from functools import wraps
label_desc: Use image node_id 4 for calling a global function with example usage: profile_ends() without return types