human
Complete this python program:
def allow_regional(fn):
assistant
#Here is the Python code you requested.

    """Decorator to make a function regionally overridable
    Example:
    @erpnext.allow_regional
    def myfunction():
    pass
    """
    def caller(*args, **kwargs):
        region = get_region()
        fn_name = ((inspect.getmodule(fn).__name__ + u'.') + fn.__name__)
        if ((region in regional_overrides) and (fn_name in regional_overrides[region])):
            return frappe.get_attr(regional_overrides[region][fn_name])(*args, **kwargs)
        else:
            return fn(*args, **kwargs)
    return caller