<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_function(self, fun=None):
 """get function as RuleFunction or return a NoRuleFunction function"""

        sfun = str(fun)
        self.say('get_function:' + sfun, verbosity=100)

        if not fun:
            return NoRuleFunction()  # dummy to execute via no_fun

        if sfun in self._rule_functions:
            return self._rule_functions[sfun]
        else:
            self.add_function(name=sfun,
                              fun=self.rule_function_not_found(fun))
            self.cry('fun(%s) not found, returning dummy' %
                     (sfun), verbosity=10)
            if sfun in self._rule_functions:
                return self._rule_functions[sfun]
            else:
                self.rule_function_not_found(fun)