def fetch_file_2_tensor(mel_spec, label_original, patch_hop, patch_len):
    """
    Given a mel_spec, perform slicing into T-F patches, and store them in a list. Create a list of labels of same shape
    inheriting clip-level labels.
    :param mel_spec:
    :return: two lists of patches and labels of same shape.
    """

    idx = 0
    start = 0
    im_TF_patches = []
    labels = []

    while (start + patch_len) <= mel_spec.shape[0]:
        im_TF_patches.append(mel_spec[start: start + patch_len])
        labels.append(label_original)
        # update indexes
        start += patch_hop
        idx += 1

    return im_TF_patches, labels