code: def test_init_and_name(es):
      log = es["log"]
  
      # Add a BooleanNullable column so primitives with that input type get tested
      boolean_nullable = log.ww["purchased"]
      boolean_nullable = boolean_nullable.ww.set_logical_type(
          "BooleanNullable"
      )
      log.ww["boolean_nullable"] = boolean_nullable
  
      features = [Feature(es["log"].ww[col]) for col in log.columns]
  
      # check all primitives have name
      for attribute_string in dir(primitives):
          attr = getattr(primitives, attribute_string)
          if isclass(attr):
              if (
                  issubclass(attr, AggregationPrimitive)
                  and attr != AggregationPrimitive
              ):
                  assert getattr(attr, "name") is not None
  
      agg_primitives = get_aggregation_primitives().values()
      # If Dask EntitySet use only Dask compatible primitives
      if es.dataframe_type == Library.DASK:
          agg_primitives = [
              prim
              for prim in agg_primitives
              if Library.DASK in prim.compatibility
          ]
      if es.dataframe_type == Library.SPARK:
          agg_primitives = [
              prim
              for prim in agg_primitives
              if Library.SPARK in prim.compatibility
          ]
  
      for agg_prim in agg_primitives:
          input_types = agg_prim.input_types
          if not isinstance(input_types[0], list):
              input_types = [input_types]
  
          # test each allowed input_types for this primitive
          for it in input_types:
              # use the input_types matching function from DFS
              matching_types = match(it, features)
              if len(matching_types) == 0:
                  raise Exception(
                      "Agg Primitive %s not tested" % agg_prim.name
                  )
              for t in matching_types:
                  instance = Feature(
                      t,
                      parent_dataframe_name="sessions",
                      primitive=agg_prim,
                  )
  
                  # try to get name and calculate
                  instance.get_name()
                  calculate_feature_matrix([instance], entityset=es)
  
imports: from datetime import datetime
  from inspect import isclass
  from math import isnan
  import numpy
  import pandas
  import pytest
  from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import Datetime
  from featuretools import AggregationFeature, Feature, IdentityFeature, Timedelta, calculate_feature_matrix, dfs, primitives
  from featuretools.entityset.relationship import RelationshipPath
  from featuretools.feature_base.cache import feature_cache
  from featuretools.primitives import Count, Max, Mean, Median, NMostCommon, NumTrue, NumUnique, Sum, TimeSinceFirst, TimeSinceLast, get_aggregation_primitives
  from featuretools.primitives.base import AggregationPrimitive
  from featuretools.synthesis.deep_feature_synthesis import DeepFeatureSynthesis, match
  from featuretools.tests.testing_utils import backward_path, feature_with_name, to_pandas
  from featuretools.utils.gen_utils import Library
label_desc: Use image node_id 7 for calling a global function with example usage: test_init_and_name(es) without return types