def is_valid_geometry(geometry):
    """
    Confirm that the geometry type is of type Polygon or MultiPolygon.

    Args:
        geometry (BaseGeometry): BaseGeometry instance (e.g. Polygon)

    Returns:
        bool

    """
    if isinstance(geometry, Polygon) or isinstance(geometry, MultiPolygon):
        return True
    else:
        return False
def is_valid_geometry ( geometry ) : if isinstance ( geometry , Polygon ) or isinstance ( geometry , MultiPolygon ) : return True else : return False
Confirm that the geometry type is of type Polygon or MultiPolygon.

    Args:
        geometry (BaseGeometry): BaseGeometry instance (e.g. Polygon)

    Returns:
        bool