code: def _get_summary_primitives(primitives: List) -> Dict[str, int]:
      """Provides metrics for a list of primitives."""
      unique_input_types = set()
      unique_output_types = set()
      uses_multi_input = 0
      uses_multi_output = 0
      uses_external_data = 0
      are_controllable = 0
      logical_type_metrics = {
          log_type: 0
          for log_type in list(list_logical_types()["type_string"])
      }
      semantic_tag_metrics = {
          sem_tag: 0 for sem_tag in list(list_semantic_tags()["name"])
      }
      semantic_tag_metrics.update(
          {"foreign_key": 0},
      )  # not currently in list_semantic_tags()
  
      for prim in primitives:
          log_in_type_checks = set()
          sem_tag_type_checks = set()
          input_types = prim.flatten_nested_input_types(
              prim.input_types
          )
          _check_input_types(
              input_types,
              log_in_type_checks,
              sem_tag_type_checks,
              unique_input_types,
          )
          for ltype in list(log_in_type_checks):
              logical_type_metrics[ltype] += 1
  
          for sem_tag in list(sem_tag_type_checks):
              semantic_tag_metrics[sem_tag] += 1
  
          if len(prim.input_types) > 1:
              uses_multi_input += 1
  
          # checks if number_output_features is set as an instance variable or set as a constant
          if (
              "self.number_output_features ="
              in getsource(prim.__init__)
              or prim.number_output_features > 1
          ):
              uses_multi_output += 1
          unique_output_types.add(str(prim.return_type))
  
          if hasattr(prim, "filename"):
              uses_external_data += 1
  
          if len(getfullargspec(prim.__init__).args) > 1:
              are_controllable += 1
  
      return {
          "general_metrics": {
              "unique_input_types": len(unique_input_types),
              "unique_output_types": len(unique_output_types),
              "uses_multi_input": uses_multi_input,
              "uses_multi_output": uses_multi_output,
              "uses_external_data": uses_external_data,
              "are_controllable": are_controllable,
          },
          "logical_type_input_metrics": logical_type_metrics,
          "semantic_tag_metrics": semantic_tag_metrics,
      }
  
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 11 for calling a global function with example usage: _get_summary_primitives(primitives) and returns: dict