def _convert_cross_encoder_output(output: Union[FloatTensor, ndarray, List[float]]) -> List[float]:
    """converts the model outputs to a list of floats

    Args:
        output (FloatTensor): _description_

    Returns:
        List[List[float]]: _description_
    """

    if _verify_model_outputs(output):
        return output

    if isinstance(output, (FloatTensor, Tensor)):
        output = output.squeeze()
        output = _float_tensor_to_list(output)
    
    elif isinstance(output, ndarray):
        output = output.squeeze()
        output = _nd_array_to_list(output)

    elif isinstance(output, list):
        if isinstance(output[0], FloatTensor):
            output = [_float_tensor_to_list(_o) for _o in output]
        elif isinstance(output[0], ndarray):
            output = [_nd_array_to_list(_o) for _o in output]
        else:
            raise TypeError(f"unsupported nested list with elements of type {type(output[0])}")

    else:
        raise TypeError(f"unsupported output type of {type(output)}")

    if _verify_model_outputs(output):
        return output
    
    raise TypeError(f"unable to convert input of type {type(output)} to a list of lists of floats")
converts the model outputs to a list of floats

    Args:
        output (FloatTensor): _description_

    Returns:
        List[List[float]]: _description_
    
src/marqo/s2_inference/reranking/model_utils.py