def METHOD_NAME(
    model: ModelProto, inplace: bool = True
) -> ModelProto:
    """
    :param model: ONNX model with sparse initializers to convert to dense representation
    :param inplace: True to do model conversion in place. Default is True
    :return: The given model with all sparse initializers converted to dense
        initializers
    """
    _check_sparse_tensor_import()
    if not inplace:
        model = deepcopy(model)
    while model.graph.sparse_initializer:
        sparse_initializer = model.graph.sparse_initializer.pop()
        model.graph.initializer.append(sparse_tensor_to_dense(sparse_initializer))
    return model