I think you're asking about running Python code on a host processor (e.g., a PC) and interfacing with MicroPython code running on the XBee module.
In that case, the answer is "yes", but you cannot make function calls from Python on the host to MicroPython on the XBee.
You would put the XBee into API mode and use Digi's xbee-python library (https://github.com/digidotcom/xbee-python) to handle the API frames.
Then you would make use of "User Data Relay" frames to send blocks of data between your Python program on the host and MicroPython on the XBee. There should be samples of that in the xbee-micropython project (https://github.com/digidotcom/xbee-micropython).
That data is in whatever format you decide on. You'll have to create your own protocol where you send a request to your MicroPython code and it generates a response.