ENH: pass in a callable to access registrationState for a plugin