def _format_target(target, nb_samples):
    """
    Formats target to return a list.

    Args:
        target (None or np.ndarray): Original target.
        nb_samples (int): Number of samples in the batch.
    """
    return [t.astype(int) for t in target] if target is not None else None