@classmethod
def from_points(cls, p1, p2):
    """Create a rectangle, knowing 2 points on the plane.
        We assume that p1 is in the upper left (closer to the origin)

        :param p1: Point instance
        :param p2: Point instance
        :return: a Point instance
        """
    inst = cls()
    inst._p1 = p1
    inst._p2 = p2
    return inst
