def point_velocities(axis_mapping, point, entry=True):
    """Find the velocities of each axis over the entry/exit of current point"""
    velocities = {}
    for axis_name, motor_info in axis_mapping.items():
        dp = point.upper[axis_name] - point.lower[axis_name]
        vp = dp / point.duration
        if entry:
            dhalf = point.positions[axis_name] - point.lower[axis_name]
        else:
            dhalf = point.upper[axis_name] - point.positions[axis_name]
        velocity = 4 * dhalf / point.duration - vp
        assert abs(velocity
            ) < motor_info.max_velocity, 'Velocity %s invalid for %r with max_velocity %s' % (
            velocity, axis_name, motor_info.max_velocity)
        velocities[axis_name] = velocity
    return velocities
