By the way, I should also add that if you have any other suggestion to solve this problem, that would be great. For example, I don't know whether this would work, but it might be simpler to leave `Line1` as an `object` as above, but do the importing like this instead:

    val Line1instance = Line1
    import LIne1instance.x

The point is that we want the call to `x` in the closure in Line3 to reference the local *instance* of Line1, rather than doing a static method call which will go to the worker node's instance of that object. I don't know whether this particular proposal works though.