CodeQL library for Python
codeql/python-all 0.11.3 (changelog, source)

Member predicate MethodCallNode::getObject

Gets the data-flow node corresponding to the object receiving this call. That is, the foo in

Note that this method may have multiple results if a single call node represents calls to multiple different objects and methods. If you want to link up objects and method names accurately, use the calls method instead.

Node getObject()