<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def define_user_analysis_extent(self, extent, crs):
 """Slot called when user has defined a custom analysis extent. .. versionadded: 2.2.0 :param extent: Extent of the user's preferred analysis area. :type extent: QgsRectangle :param crs: Coordinate reference system for user defined analysis extent. :type crs: QgsCoordinateReferenceSystem """

        extent = QgsGeometry.fromRect(extent)
        self.extent.set_user_extent(extent, crs)
        self.validate_impact_function()