code: def summarize_primitives() -> pd.DataFrame:
      """Returns a metrics summary DataFrame of all primitives found in list_primitives."""
      (
          trans_names,
          trans_primitives,
          trans_valid_inputs,
          trans_return_type,
      ) = _get_names_primitives(get_transform_primitives)
  
      (
          agg_names,
          agg_primitives,
          agg_valid_inputs,
          agg_return_type,
      ) = _get_names_primitives(get_aggregation_primitives)
  
      tot_trans = len(trans_names)
      tot_agg = len(agg_names)
      tot_prims = tot_trans + tot_agg
      all_primitives = trans_primitives + agg_primitives
      primitives_summary = _get_summary_primitives(all_primitives)
      summary_dict = {
          "total_primitives": tot_prims,
          "aggregation_primitives": tot_agg,
          "transform_primitives": tot_trans,
          **primitives_summary["general_metrics"],
      }
      summary_dict.update(
          {
              f"uses_{ltype}_input": count
              for ltype, count in primitives_summary[
                  "logical_type_input_metrics"
              ].items()
          },
      )
      summary_dict.update(
          {
              f"uses_{tag}_tag_input": count
              for tag, count in primitives_summary[
                  "semantic_tag_metrics"
              ].items()
          },
      )
      summary_df = pd.DataFrame(
          [{"Metric": k, "Count": v} for k, v in summary_dict.items()],
      )
      return summary_df
  
imports: import importlib.util
  import os
  from inspect import getfullargspec, getsource, isclass
  from typing import Dict, List
  import pandas
  from woodwork import list_logical_types, list_semantic_tags, type_system
  from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import NaturalLanguage
  import featuretools
  from featuretools.primitives import NumberOfCommonWords
  from featuretools.primitives.base import AggregationPrimitive, PrimitiveBase, TransformPrimitive
  from featuretools.utils.gen_utils import Library, find_descendents
label_desc: Use image node_id 7 for calling a global function with example usage: summarize_primitives() and returns: summary_df