onTrigger Collision

I Need CollisionHandlerEvent because the CollisionHandlerPusher is like if you don’t want to run into walls so if you go to a wall it will not let you go through the model. If I use CollisionHandlerEvent it will allow me to go through
the model and active it. I look at the code and I don’t get it I read what it says for CollisionHandlerEvent I kinda get it here’s the code:

class MyObject(DirectObject.DirectObject):
    def __init__(self):
      self.accept('car-into-rail', handleRailCollision)
 
    def handleRailCollision(self, entry):
      print entry