old_contents: import collections
  
  from inselect.lib.inselect_error import InselectError
  
  
  # Simple representations of Points and rectangles
  Point = collections.namedtuple('Point', ['x', 'y'])
  Coordinates = collections.namedtuple('Coordinates', ['x0', 'y0', 'x1', 'y1'])
  
  
  class Rect(collections.namedtuple('Rect', ['left', 'top', 'width', 'height'])):
      def __new__(cls, left, top, width, height):
          if left<0 or top<0 or width<=0 or height<=0:
              raise InselectError('Bad rectangle')
          else:
              return super(Rect, cls).__new__(cls, left, top, width, height)
  
      @property
      def area(self):
          "The product of width and height"
          return self.width*self.height
  
      @property
      def coordinates(self):
          "Coordinates(left, top, right, bottom)"
          return Coordinates(self.left, self.top, self.left+self.width,
                             self.top+self.height)
  
      @property
      def topleft(self):
          "Point(x, y)"
          return Point(self.left, self.top)
  
      @property
      def bottomright(self):
          "Point(x, y)"
          return Point(self.left+self.width, self.top+self.height)
  
      @property
      def centre(self):
          "Point(x, y)"
          return Point(self.left+self.width/2, self.top+self.height/2)
  
      def __eq__(self, other):
          if isinstance(other, Rect):
              return (self.left==other.left and
                      self.top==other.top and
                      self.width==other.width and
                      self.height==other.height)
          else:
              raise NotImplementedError()
  
      def __neq__(self, other):
        return not self==other
  
new_contents: import collections
  
  from inselect.lib.inselect_error import InselectError
  
  
  # Simple representations of Points and rectangles
  Point = collections.namedtuple('Point', ['x', 'y'])
  Coordinates = collections.namedtuple('Coordinates', ['x0', 'y0', 'x1', 'y1'])
  
  
  class Rect(collections.namedtuple('Rect', ['left', 'top', 'width', 'height'])):
      def __new__(cls, left, top, width, height):
          if left<0 or top<0 or width<=0 or height<=0:
              raise InselectError('Bad rectangle')
          else:
              return super(Rect, cls).__new__(cls, left, top, width, height)
  
      @property
      def area(self):
          "The product of width and height"
          return self.width*self.height
  
      @property
      def coordinates(self):
          "Coordinates(left, top, right, bottom)"
          return Coordinates(self.left, self.top, self.left+self.width,
                             self.top+self.height)
  
      @property
      def topleft(self):
          "Point(x, y)"
          return Point(self.left, self.top)
  
      @property
      def bottomright(self):
          "Point(x, y)"
          return Point(self.left+self.width, self.top+self.height)
  
      @property
      def centre(self):
          "Point(x, y)"
          return Point(self.left+self.width/2, self.top+self.height/2)
  
      def __eq__(self, other):
          if isinstance(other, Rect):
              return (self.left==other.left and
                      self.top==other.top and
                      self.width==other.width and
                      self.height==other.height)
          else:
              raise NotImplementedError()
  
      def __ne__(self, other):
        return not self==other
  
subject: Correct 'not equal to' method name