def METHOD_NAME(diags: xr.Dataset) -> xr.DataArray:
    if "northward_wind_pressure_level_zonal_time_mean" not in diags:
        return xr.DataArray()
    northward_wind = diags["northward_wind_pressure_level_zonal_time_mean"]
    psi = vcm.mass_streamfunction(northward_wind).sel(pressure=slice(30000, 70000))
    psi_mid_trop = psi.weighted(psi.pressure).mean("pressure")
    return psi_mid_trop.assign_attrs(
        long_name="mass streamfunction 300-700hPa average", units="Gkg/s"
    )