Exactly, for example if I give it:
hn_example_up = foo.north_garbage_jlakd()
hn_example_right =
it correctly spits out
hn_example_up = foo.north_garbage_jlakd()
hn_example_right = foo.east_garbage_jlakd()
hn_example_down = foo.south_garbage_jlakd()
hn_example_left = foo.west_garbage_jlakd()
Even though those identifiers including random letters are certainly not in the training data. It can do surprisingly good basic reasoning.
Here is another example. I give it:
hn_example_up = foo.x_0_y_1()
hn_example_left = foo.x_neg_1_y_0()
So my function names are like referring to unit distances on the x/y axes. Copilot correctly figures out what I'm doing and completes:
hn_example_up = foo.x_0_y_1()
hn_example_left = foo.x_neg_1_y_0()
hn_example_down = foo.x_0_y_neg_1()
hn_example_right = foo.x_1_y_0()
A few weeks ago I coded a rubik's cube solver that involved some very nuanced and weird spatial reasoning and was blown away by Copilot's ability demonstrate it "understood" concepts such as turning the right side down is identical to turning the left side up when viewed from the back of the cube, or stuff like that.