def METHOD_NAME(self):
    """return properly formatted string in toString()"""
    p = mapscript.pointObj(1.0, 1.0, 0.002, 15.0)
    if hasattr(p, 'z') and hasattr(p, 'm'):
        p_str = "{ 'x': %.16g, 'y': %.16g, 'z': %.16g, 'm': %.16g }" \
              % (p.x, p.y, p.z, p.m)
    else:
        p_str = "{ 'x': %.16g, 'y': %.16g }" % (p.x, p.y)
    assert p.toString() == p_str, p.toString()