def display_onnx(model_onnx, max_length=1000):
    """
    Returns a shortened string of the model.

    @param      model_onnx      onnx model
    @param      max_length      maximal string length
    @return                     string
    """
    res = str(model_onnx)
    if max_length is None or len(res) <= max_length:
        return res
    begin = res[:max_length // 2]
    end = res[-max_length // 2:]
    return '\n'.join([begin, '[...]', end])
