class_docstr: A setting that specifies an integer range where the minimum and maximum
  can be set to unbounded by the user.
  
  The maximum value can be relative to the far side in which case a negative
  number is returned for slicing.
class_docstr_tok: ["A","setting","that","specifies","an","integer","range","where","the","minimum","and","maximum","can","be","set","to","unbounded","by","the","user",".","The","maximum","value","can","be","relative","to","the","far","side","in","which","case","a","negative","number","is","returned","for","slicing","."]
code: def test_valid(self, pipeline):
      values = self.value_text.split(",")
      if len(values) < 2:
          raise ValidationError(
              "Minimum and maximum values must be separated by a comma",
              self,
          )
      if len(values) > 2:
          raise ValidationError("Only two values allowed", self)
      if (not values[0].isdigit()) and values[0] != "begin":
          raise ValidationError(
              "%s is not an integer" % (values[0]), self
          )
      if len(values[1]) == 0:
          raise ValidationError("The end value is blank", self)
      if not (
          values[1] == "end"
          or values[1].isdigit()
          or (
              values[1][0] == "-"
              and (values[1][1:].isdigit() or values[1][1:] == "end")
          )
      ):
          raise ValidationError(
              "%s is not an integer or %s" % (values[1], "end"), self
          )
      if (
          (not self.unbounded_min)
          and self._minval
          and self._minval > self.min
      ):
          raise ValidationError(
              "%s can't be less than %d"
              % (self.min_text, self._minval),
              self,
          )
      if (
          (not self.unbounded_max)
          and self._maxval
          and self._maxval < self.max
      ):
          raise ValidationError(
              "%d can't be greater than %d" % (self.max, self._maxval),
              self,
          )
      if (
          (not self.unbounded_min)
          and (not self.unbounded_max)
          and self.min > self.max > 0
      ):
          raise ValidationError(
              "%d is greater than %d" % (self.min, self.max), self
          )
  
file_path: CellProfiler/src/subpackages/core/cellprofiler_core/setting/range/integer_range/_integer_or_unbounded_range.py
imports: from ._integer_range import IntegerRange
  from .._range import Range
  from ..._validation_error import ValidationError
label_desc: Use image node_id 12 for calling the IntegerOrUnboundedRange obj's underlying member method code with example usage: obj.test_valid(pipeline) without return types