<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_dn_d_mode_change(self, dnd_mode):
 """Notification when the drag'n drop mode changes. in dnd_mode of type :class:`DnDMode` The new mode for drag'n drop. """

        if not isinstance(dnd_mode, DnDMode):
            raise TypeError("dnd_mode can only be an instance of type DnDMode")
        self._call("onDnDModeChange",
                     in_p=[dnd_mode])