'Get a global value from the func_global (first) or
as a builtins (second).  If both failed, return a ir.UNDEFINED.'

def get_global_value(self, name):

    try:
        return utils.get_function_globals(self.func_id.func)[name]
    except KeyError:
        return getattr(builtins, name, ir.UNDEFINED)
