code: def coerce(self, value):
          
          if isinstance(value, LinearOrderedCell) and (self.domain == value.domain or \
              list_diff(self.domain, value.domain) == []):
              # is LinearOrderedCell with same domain
              return value
          elif value in self.domain:
              return LinearOrderedCell(self.domain, value, value)
          elif isinstance(value, (list, tuple)) and all(map(value in self.domain, value)):
              if len(value) == 1:
                  return LinearOrderedCell(self.domain, value[0], value[0])
              elif len(value) == 2:
                  return LinearOrderedCell(self.domain, *value)
              else:
                  sorted_vals = sorted(value, key=lambda x: self.to_i(x))
                  return LinearOrderedCell(self.domain, sorted_vals[0], sorted_vals[-1])
          else:
              raise Exception("Cannot coerce %s into LinearOrderedCell" % (str(value)))
docs: Takes one or two values in the domain and returns a LinearOrderedCell
          with the same domain