def METHOD_NAME():
    """Closing over variable defined in loop."""
    lst = []
    for i in range(10):
        def nested():
            """Nested function."""
            return i**2  # [cell-var-from-loop]
        lst.append(nested)
    return lst