<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _worst_case_load(self, worst_case_scale_factors, peakload_consumption_ratio, modes):
 """ Define worst case load time series for each sector. Parameters worst_case_scale_factors : dict Scale factors defined in config file 'config_timeseries.cfg'. Scale factors describe actual power to nominal power ratio of in worst-case scenarios. peakload_consumption_ratio : dict Ratios of peak load to annual consumption per sector, defined in config file 'config_timeseries.cfg' modes : list List with worst-cases to generate time series for. Can be 'feedin_case', 'load_case' or both. """


        sectors = ['residential', 'retail', 'industrial', 'agricultural']
        lv_power_scaling = np.array(
            [worst_case_scale_factors['lv_{}_load'.format(mode)]
             for mode in modes])
        mv_power_scaling = np.array(
            [worst_case_scale_factors['mv_{}_load'.format(mode)]
             for mode in modes])

        lv = {(sector, 'lv'): peakload_consumption_ratio[sector] *
                              lv_power_scaling
              for sector in sectors}
        mv = {(sector, 'mv'): peakload_consumption_ratio[sector] *
                              mv_power_scaling
              for sector in sectors}
        self.timeseries.load = pd.DataFrame({**lv, **mv},
                                            index=self.timeseries.timeindex)