def METHOD_NAME(wrench, transform):
    """
    Apply a transform in the form of a geometry_msgs message to a PyKDL Wrench.
    :param wrench: The PyKDL wrench to transform.
    :type wrench: PyKDL.Wrench
    :param transform: The transform to apply.
    :type transform: geometry_msgs.msg.TransformStamped
    :return: The transformed PyKDL wrench.
    :rtype: PyKDL.Wrench
    """
    res = transform_to_kdl(transform) * wrench
    res.header = transform.header
    return res