<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extent(self, srid=None):
 """Returns the GeoQuerySet extent as a 4-tuple. Keyword args: srid -- EPSG id for for transforming the output geometry. """

        expr = self.geo_field.name
        if srid:
            expr = geofn.Transform(expr, srid)
        expr = models.Extent(expr)
        clone = self.all()
        name, val = clone.aggregate(expr).popitem()
        return val