Returns the central point for points in list

def center(a: Union[Set["Point2"], List["Point2"]]) -> "Point2":
        """ Returns the central point for points in list """
        s = Point2((0, 0))
        for p in a:
            s += p
        return s / len(a)