Getting class method from instantiated class via collision

I’ve been working on a game for myself about driving and operating tanks. Currently, I’m trying to implement a system whereby if you click on a component in the vehicle, for example, a gunsight or viewport, you run a function/method found in the class that has been instantiated. The instantiated class also has a method that creates the object inside the game world, but doesn’t handle collision. I have created the code needed for mouse picking,

I have divided the program up into three halves, the main program, a class library, and a utility library.

This is a pastebin of all the relevant code from my main program:
hastebin.com/fatogogepa.py

And this is a pastebin for my class inside the class library:
hastebin.com/wadaloheba.py

The utility library doesn’t contain anything related to this code yet apart from the displayScreenText function, which works.

What I’d like help with is for someone to explain how to get the displayMessage function to be executed when selecting the picked object - if I can work out this, then I can apply it to anything I want, I just need to know how to call the class’s method from the picked object.

With collisions you usually end up with the CollisionNode or a NodePath containing the collision node, so some people store the object that they need as a python tag (node.setPythonTag())

gunnerPrimarySight = TankClass.visionBlock(..)
.
.
.
gunnerPrimarySightCollider.setPythonTag('some_meaningful_name', gunnerPrimarySight )
.
.
.
def collideEventIn(entry):
    .
    .
    .
    np_into=entry.getIntoNodePath()
    if np_into.hasPythonTag('some_meaningful_name'):
       some_meaningful_thing = np_into.getPythonTag('some_meaningful_name')
       some_meaningful_thing.displayMessage()

I’m not sure if this pseudo-code is helpful, but it should point you in a hopefully right direction.