apply monkey patches