The Python nodes support flow variables of types double, integer, and string. If you want to pass more complex objects around, you’ll need to use a Python scripting node that features an object port (Python Object Reader, Python Object Writer, Python Predictor, and Python Learner). Unfortunately, none of these nodes have both input and output ports for both data and objects. Also, they only work for objects that can be pickled.
If that doesn’t work for you, you could also try to manually save the object to a workflow relative location in one node (e.g., using pickling if that’s possible), pass the file location of the saved object as a flow variable to the next Python node and manually load it there, again.
You can get the workflow location via the Extract Context Properties node (property context.workflow.absolute-path) and pass it to your first Python node as a flow variable.