def almost_equals(self, other, max_distance=<NUM_LIT>, points_per_edge=<NUM_LIT:8>):
if not isinstance(other, Polygon):<EOL><INDENT>return False<EOL><DEDENT>if self.label is not None or other.label is not None:<EOL><INDENT>if self.label is None:<EOL><INDENT>return False<EOL><DEDENT>if other.label is None:<EOL><INDENT>return False<EOL><DEDENT>if self.label != other.label:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return self.exterior_almost_equals(<EOL>other, max_distance=max_distance, points_per_edge=points_per_edge)<EOL>
Estimate if this polygon's and another's geometry/labels are similar.

This is the same as :func:`imgaug.Polygon.exterior_almost_equals` but
additionally compares the labels.

Parameters
----------
other
    The object to compare against. If not a Polygon, then False will
    be returned.

max_distance : float, optional
    See :func:`imgaug.augmentables.polys.Polygon.exterior_almost_equals`.

points_per_edge : int, optional
    See :func:`imgaug.augmentables.polys.Polygon.exterior_almost_equals`.

Returns
-------
bool
    Whether the two polygons can be viewed as equal. In the case of
    the exteriors this is an approximate test.