def call_mouse_method(self, method_name, event):
        """Execute object method if mouse hovers.

        Parameters

            - event (pygame.event.Event of
              pygame.MOUSEBUTTONUP or pygame.MOUSEBUTTONDOWN
              type)

              It is required in order to comply with
              protocol used. We retrieve the mouse position
              from its "pos" attribute.

              Check pygame.event module documentation on
              pygame website for more info about this event
              object.
        """
        ### retrieve the mouse position
        mouse_pos = event.pos

        ### iterate over each object in the lists,
        ### until you find the colliding one

        colliding_obj = None

        for obj in self.clickable_objs:

            if obj.rect.collidepoint(mouse_pos):

                colliding_obj = obj

                ### note: we usually use break after
                ### checking for point collision (clicking)
                ### between multiple objects, but here it
                ### is specially important because the
                ### move and delete button operations change
                ### the position of items, which could cause
                ### them to be invoked if we were to
                ### continue interating and they moved
                ### into the colliding spot incidentally
                break

        ### if a colliding object was found, execute the
        ### mouse method requested in the method_name
        ### argument (passing the event object to it), if
        ### it the method exists

        if colliding_obj:

            try:
                mouse_method = getattr(colliding_obj, method_name)
            except AttributeError:
                pass
            else:
                mouse_method(event)
Execute object method if mouse hovers.

        Parameters

            - event (pygame.event.Event of
              pygame.MOUSEBUTTONUP or pygame.MOUSEBUTTONDOWN
              type)

              It is required in order to comply with
              protocol used. We retrieve the mouse position
              from its "pos" attribute.

              Check pygame.event module documentation on
              pygame website for more info about this event
              object.
        
nodezator/our3rdlibs/iterablewidget/op.py