It will definitely go inside the function to match patterns, but you’re right, we don’t have a Function Pattern right now, we should probably add one.
This seems to be a function created by the FuseOps pass. Typically we’d do pattern rewriting/partitioning before that, maybe there’s a simpler way to get what you’re looking for?