<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unfold(tensor, mode):
 """Returns the mode-`mode` unfolding of `tensor`. Parameters tensor : ndarray mode : int Returns ------- ndarray unfolded_tensor of shape ``(tensor.shape[mode], -1)`` Author ------ Jean Kossaifi <https://github.com/tensorly> """

    return np.moveaxis(tensor, mode, 0).reshape((tensor.shape[mode], -1))