docstr: A class that can be used to give a range of accepted shapes.
  
  Attribute:
  
  lower_bound: (int)
      The minimum valid value for the shape.
  upper_bound: (int)
      The maximum valid value for the shape.
      Set to -1 if there's no upper limit.
  default: (int) or None
      The default value that is used for initiating the model, and set in
      the metadata of the model file.
      If set to None, `lower_bound` would be used as default.
docstr_tok: ["A","class","that","can","be","used","to","give","a","range","of","accepted","shapes",".","Attribute",":","lower_bound",":","(","int",")","The","minimum","valid","value","for","the","shape",".","upper_bound",":","(","int",")","The","maximum","valid","value","for","the","shape",".","Set","to","-1","if","there","'s","no","upper","limit",".","default",":","(","int",")","or","None","The","default","value","that","is","used","for","initiating","the","model",",","and","set","in","the","metadata","of","the","model","file",".","If","set","to","None",",","`","lower_bound","`","would","be","used","as","default","."]
code: def __init__(self, lower_bound=1, upper_bound=-1, default=None):
      """
      A class that can be used to give a range of accepted shapes.
  
      Attribute:
  
      lower_bound: (int)
          The minimum valid value for the shape.
      upper_bound: (int)
          The maximum valid value for the shape.
          Set to -1 if there's no upper limit.
      default: (int) or None
          The default value that is used for initiating the model, and set in
          the metadata of the model file.
          If set to None, `lower_bound` would be used as default.
      """
      self.lower_bound = lower_bound
      self.upper_bound = upper_bound
      if default is None:
          self.default = lower_bound
      else:
          if default < lower_bound:
              raise ValueError(
                  "Default value {} is less than minimum value ({}) for range".format(
                      default, lower_bound
                  )
              )
          if upper_bound > 0 and default > upper_bound:
              raise ValueError(
                  "Default value {} is greater than maximum value ({}) for range".format(
                      default, upper_bound
                  )
              )
          self.default = default
  
imports: import logging
  import numpy
  import six
  from coremltools.converters.mil.mil.types.symbolic import is_symbolic
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.types.type_mapping import numpy_type_to_builtin_type, is_builtin
label_desc: Use image node_id 1 to create a new RangeDim object from inherited base classes: object with example: obj = RangeDim(lower_bound, upper_bound, default)