<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def av(self, data, lon_str=LON_STR, lat_str=LAT_STR, land_mask_str=LAND_MASK_STR, sfc_area_str=SFC_AREA_STR):
 """Time-average of region-averaged data. Parameters data : xarray.DataArray The array to compute the regional time-average of lat_str, lon_str, land_mask_str, sfc_area_str : str, optional The name of the latitude, longitude, land mask, and surface area coordinates, respectively, in ``data``. Defaults are the corresponding values in ``aospy.internal_names``. Returns ------- xarray.DataArray The region-averaged and time-averaged data. """

        ts = self.ts(data, lon_str=lon_str, lat_str=lat_str,
                     land_mask_str=land_mask_str, sfc_area_str=sfc_area_str)
        if YEAR_STR not in ts.coords:
            return ts
        else:
            return ts.mean(YEAR_STR)