code: def apply_conditions(self, value):
          
          retval = value
          if self._cyclic:
              retval = apply_cyclic(value, self)
          retval = self._reflect(retval)
          if isinstance(retval, numpy.ndarray) and retval.size == 1:
              try:
                  retval = retval[0]
              except IndexError:
                  retval = float(retval)
          return retval
docs: Applies any boundary conditions to the given value.
  
          The value is manipulated according based on the following conditions:
  
           * If `self.cyclic` is True then `value` is wrapped around to the
             minimum (maximum) bound if `value` is `>= self.max` (`< self.min`)
             bound. For example, if the minimum and maximum bounds are `0, 2*pi`
             and `value = 5*pi`, then the returned value will be `pi`.
           * If `self.min` is a reflected boundary then `value` will be
             reflected to the right if it is `< self.min`. For example, if
             `self.min = 10` and `value = 3`, then the returned value will be
             17.
           * If `self.max` is a reflected boundary then `value` will be
             reflected to the left if it is `> self.max`. For example, if
             `self.max = 20` and `value = 27`, then the returned value will be
             13.
           * If `self.min` and `self.max` are both reflected boundaries, then
             `value` will be reflected between the two boundaries until it
             falls within the bounds. The first reflection occurs off of the
             maximum boundary. For example, if `self.min = 10`, `self.max =
             20`, and `value = 42`, the returned value will be 18 ( the first
             reflection yields -2, the second 22, and the last 18).
           * If neither bounds are reflected and cyclic is False, then the
             value is just returned as-is.
  
          Parameters
          ----------
          value : float
              The value to apply the conditions to.
  
          Returns
          -------
          float
              The value after the conditions are applied; see above for details.