code: def _check_timeindex(self, curtailment_timeseries, network):
          
          if curtailment_timeseries is None:
              message = 'No curtailment given.'
              logging.error(message)
              raise KeyError(message)
          try:
              curtailment_timeseries.loc[network.timeseries.timeindex]
          except:
              message = 'Time index of curtailment time series does not match ' \
                        'with load and feed-in time series.'
              logging.error(message)
              raise KeyError(message)
docs: Raises an error if time index of curtailment time series does not
          comply with the time index of load and feed-in time series.
  
          Parameters
          -----------
          curtailment_timeseries : :pandas:`pandas.Series<series>` or \
              :pandas:`pandas.DataFrame<dataframe>`
              See parameter `curtailment_timeseries` in class definition for more
              information.