<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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