code: def test_invalid_primitive(es):
      with pytest.raises(
          ValueError,
          match="'foobar' is not a recognized primitive name",
      ):
          get_valid_primitives(
              es,
              target_dataframe_name="log",
              selected_primitives=["foobar"],
          )
  
      msg = (
          "Selected primitive <enum 'Library'> "
          "is not an AggregationPrimitive, TransformPrimitive, or str"
      )
      with pytest.raises(ValueError, match=msg):
          get_valid_primitives(
              es,
              target_dataframe_name="log",
              selected_primitives=[Library],
          )
  
file_path: featuretools/featuretools/tests/synthesis/test_get_valid_primitives.py
imports: import pytest
  from woodwork.column_schema import ColumnSchema
  from featuretools.primitives import AggregationPrimitive, Count, Hour, IsIn, Not, TimeSincePrevious, TransformPrimitive
  from featuretools.synthesis.get_valid_primitives import get_valid_primitives
  from featuretools.utils.gen_utils import Library
label_desc: Use image node_id 3 for calling a global function with example usage: test_invalid_primitive(es) without return types