def METHOD_NAME(cls) -> onnx.TypeProto:
    if cls.shape is None:
        shape = ()  # "FLOAT" is treated as a scalar
    elif cls.shape is Ellipsis:
        shape = None  # "FLOAT[...]" is a tensor of unknown rank
    elif isinstance(cls.shape, tuple):
        shape = cls.shape  # example: "FLOAT[10,20]"
    else:
        shape = [cls.shape]  # example: "FLOAT[10]"
    return onnx.helper.make_tensor_type_proto(cls.dtype, shape)