def METHOD_NAME(_obj, _event):
    global apply_force, fpss
    cnt = next(counter)
    showm.render()
    if cnt % 1 == 0:
        fps = showm.frame_rate
        fpss = np.append(fpss, fps)
        tb.message = (
            'Avg. FPS: ' + str(np.round(np.mean(fpss), 0)) + '\nSim Steps: ' + str(cnt)
        )
    # Get the position and orientation of the first domino.
    domino1_pos, domino1_orn = p.getBasePositionAndOrientation(dominos[0])
    # Apply force on the First Domino (domino) above the Center of Mass.
    if apply_force:
        # Apply the force.
        p.applyExternalForce(
            dominos[0],
            -1,
            forceObj=[100, 0, 0],
            posObj=domino1_pos + np.array([0, 0, 1.7]),
            flags=p.WORLD_FRAME,
        )
        apply_force = False
    # Updating the position and orientation of individual dominos.
    for idx, domino in enumerate(dominos):
        sync_domino(idx, domino)
    utils.update_actor(domino_actor)
    # Simulate a step.
    p.stepSimulation()
    # Exit after 300 steps of simulation.
    if cnt == 300:
        showm.exit()