def METHOD_NAME(self, mains):
    """In-memory disaggregation.
    Parameters
    ----------
    mains : pd.Series
    Returns
    -------
    appliance_powers : pd.DataFrame where each column represents a
        disaggregated appliance.  Column names are the integer index
        into `self.model` for the appliance in question.
    """
    '''if not self.model:
        raise RuntimeError(
            "The model needs to be instantiated before"
            " calling `disaggregate`.  The model"
            " can be instantiated by running `train`.")'''
    print("...............CO disaggregate_chunk running.............")
    # sklearn produces lots of DepreciationWarnings with PyTables
    import warnings
    warnings.filterwarnings("ignore", category=DeprecationWarning)
    # Because CombinatorialOptimisation could have been trained using
    # either train() or train_on_chunk(), we must
    # set state_combinations here.
    self._set_state_combinations_if_necessary()
    """
     # Add vampire power to the model
    if vampire_power is None:
        vampire_power = get_vampire_power(mains)
    if vampire_power > 0:
        print("Including vampire_power = {} watts to model..."
              .format(vampire_power))
        n_rows = self.state_combinations.shape[0]
        vampire_power_array = np.zeros((n_rows, 1)) + vampire_power
        state_combinations = np.hstack(
            (self.state_combinations, vampire_power_array))
    else:
        state_combinations = self.state_combinations
    """
    state_combinations = self.state_combinations
    summed_power_of_each_combination = np.sum(state_combinations, axis=1)
    # summed_power_of_each_combination is now an array where each
    # value is the total power demand for each combination of states.
    # Start disaggregation
    test_prediction_list = []
    for test_df in mains:
        appliance_powers_dict = {}
        indices_of_state_combinations, residual_power = find_nearest(
            summed_power_of_each_combination, test_df.values)
        for i, model in enumerate(self.model):
            print("Estimating power demand for '{}'"
                  .format(model['appliance_name']),end="\r")
            predicted_power = state_combinations[
                indices_of_state_combinations, i].flatten()
            column = pd.Series(
                predicted_power, index=test_df.index, name=i)
            appliance_powers_dict[self.model[i]['appliance_name']] = column
        appliance_powers = pd.DataFrame(
            appliance_powers_dict, dtype='float32')
        test_prediction_list.append(appliance_powers)
    return test_prediction_list