Retrieve function by type

Retrieves a function of a specific type for a custom action definition. Function types include PRE_ACTION_EXECUTION and POST_ACTION_EXECUTION.