Well in this case, it's more integrating Python with C i.e. writing a C callable and calling it from Python.
I'm not really a Lua fan personally (the confusing indice and ordinal notation scares me), but I can see why it makes sense for integration purposes. Clean, simple, to the point.