'Returns an object from the code file referenced by `code_namespace`
(this will normally be a callable object)'

def get_hook(self, name):

    if self.code_namespace:
        if ((name in self.hook_map) and (self.hook_map[name] in self.code_namespace)):
            return self.code_namespace[self.hook_map[name]]
        elif (name in self.code_namespace):
            return self.code_namespace[name]
    return None
