code: def hook_for(self, configurable_class, action):
          
          configurable_class_name = configurable_class.__name__.lower()
  
          return getattr(
              self,
              "on_" + configurable_class_name + "_" + action,
              None
          )
docs: Helper method for determining if an on_<configurable class>_<action>
          method is present, to be used as a hook in the add/update/remove
          configurable methods.