def ClosureLocalizerFunction():
    try:
        function = function
        print("Function didn't give unbound local error")
    except UnboundLocalError as e:
        print('Function gave unbound local error when accessing function before assignment:', repr(e))
def ClosureLocalizerFunction():
    try:
        function = function
        print("Function didn't give unbound local error")
    except UnboundLocalError as e:
        print('Function gave unbound local error when accessing function before assignment:', repr(e))