def create_valuetype_tensor(shape, data_type):
    """
    Return proto.MIL_pb2.ValueType with tensor (TensorType) set.
    shape: list of ints
    """
    v_type = proto.MIL_pb2.ValueType()
    update_tensortype(v_type.tensorType, shape, data_type)
    return v_type

    Return proto.MIL_pb2.ValueType with tensor (TensorType) set.
    shape: list of ints
    
coremltools/converters/mil/backend/mil/helper.py