def METHOD_NAME(self, edited=True):
    """Reload functions, from edited_source or known_good.
    :param edited: if True then functions are reloaded from edited_source, otherwise known_good is used.
    """
    if edited:
        source = self.edited_source
    else:
        source = self.known_good
    with LiveExecution.lock:
        if source is not None:
            compiled_modules = {}
            tree = ast.parse(source)
            for f in [n for n in ast.walk(tree) if isinstance(n, ast.FunctionDef)]:
                module = _ast.Module(body=[f], type_ignores=[])
                code = compiled_modules.get(module)
                if code is None:
                    code = compile(module, self.filename, "exec")
                    compiled_modules[module] = code
                function_context = {}
                eval(code, dict(self.ns), function_context)
                self.ns[f.name].__code__ = function_context[f.name].__code__