code: def index_to_coordinates(self, index):
          
          self.validate_index(index)
          x = int(index % self.length)
          y = int((index - x) / self.length)
          return x, y
docs: Return a set of 2D ``(x, y)`` coordinates from a linear index.