Filter by material on Datasmith-imported Static Meshes?

Hi everyone,
Is there a built-in function, that allows filtering Static Meshes in a Dataprep graph, where the Meshes themselves are named “Component_1”, etc? My goal is to turn on Nanite for all geometry, imported from Sketchup 2022 via Datasmith, except for any materials whose name contains “glass”.
Since the Static Meshes do not contain the Sketchup material name, I am looking at how else to filter them.
I am wondering if this takes a custom Blueprint class?
Thank you.

This Python script, used after importing a Datasmith file, works for me! It tests all materials in the Scene, then turns Nanite on for meshes that are not transparent.