code: def list_primitives():
      """Returns a DataFrame that lists and describes each built-in primitive."""
      (
          trans_names,
          trans_primitives,
          valid_inputs,
          return_type,
      ) = _get_names_primitives(
          get_transform_primitives,
      )
      trans_dask = [
          Library.DASK in primitive.compatibility
          for primitive in trans_primitives
      ]
      trans_spark = [
          Library.SPARK in primitive.compatibility
          for primitive in trans_primitives
      ]
      transform_df = pd.DataFrame(
          {
              "name": trans_names,
              "description": _get_descriptions(trans_primitives),
              "dask_compatible": trans_dask,
              "spark_compatible": trans_spark,
              "valid_inputs": valid_inputs,
              "return_type": return_type,
          },
      )
      transform_df["type"] = "transform"
  
      (
          agg_names,
          agg_primitives,
          valid_inputs,
          return_type,
      ) = _get_names_primitives(
          get_aggregation_primitives,
      )
      agg_dask = [
          Library.DASK in primitive.compatibility
          for primitive in agg_primitives
      ]
      agg_spark = [
          Library.SPARK in primitive.compatibility
          for primitive in agg_primitives
      ]
      agg_df = pd.DataFrame(
          {
              "name": agg_names,
              "description": _get_descriptions(agg_primitives),
              "dask_compatible": agg_dask,
              "spark_compatible": agg_spark,
              "valid_inputs": valid_inputs,
              "return_type": return_type,
          },
      )
      agg_df["type"] = "aggregation"
  
      columns = [
          "name",
          "type",
          "dask_compatible",
          "spark_compatible",
          "description",
          "valid_inputs",
          "return_type",
      ]
      return pd.concat([agg_df, transform_df], ignore_index=True)[
          columns
      ]
  
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 6 for calling a global function with example usage: list_primitives() and returns: pd