<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compute(self):
 """Computes the tendencies for all state variables given current state and specified input. The function first computes all diagnostic processes. They don't produce any tendencies directly but they may affect the other processes (such as change in solar distribution). Subsequently, all tendencies and diagnostics for all explicit processes are computed. Tendencies due to implicit and adjustment processes need to be calculated from a state that is already adjusted after explicit alteration. For that reason the explicit tendencies are applied to the states temporarily. Now all tendencies from implicit processes are calculated by matrix inversions and similar to the explicit tendencies, the implicit ones are applied to the states temporarily. Subsequently, all instantaneous adjustments are computed. Then the changes that were made to the states from explicit and implicit processes are removed again as this :class:`~climlab.process.time_dependent_process.TimeDependentProcess.compute()` function is supposed to calculate only tendencies and not apply them to the states. Finally, all calculated tendencies from all processes are collected for each state, summed up and stored in the dictionary ``self.tendencies``, which is an attribute of the time-dependent-process object, for which the :class:`~climlab.process.time_dependent_process.TimeDependentProcess.compute()` method has been called. **Object attributes** \n During method execution following object attributes are modified: :ivar dict tendencies: dictionary that holds tendencies for all states is calculated for current timestep through adding up tendencies from explicit, implicit and adjustment processes. :ivar dict diagnostics: process diagnostic dictionary is updated by diagnostic dictionaries of subprocesses after computation of tendencies. """

        #  First reset tendencies to zero -- recomputing them is the point of this method
        for varname in self.tendencies:
            self.tendencies[varname] *= 0.
        if not self.has_process_type_list:
            self._build_process_type_list()
        tendencies = {}
        ignored = self._compute_type('diagnostic')
        tendencies['explicit'] = self._compute_type('explicit')
        #  Tendencies due to implicit and adjustment processes need to be
        #  calculated from a state that is already adjusted after explicit stuff
        #  So apply the tendencies temporarily and then remove them again
        for name, var in self.state.items():
            var += tendencies['explicit'][name] * self.timestep
        # Now compute all implicit processes -- matrix inversions
        tendencies['implicit'] = self._compute_type('implicit')
        #  Same deal ... temporarily apply tendencies from implicit step
        for name, var in self.state.items():
            var += tendencies['implicit'][name] * self.timestep
        # Finally compute all instantaneous adjustments -- expressed as explicit forward step
        tendencies['adjustment'] = self._compute_type('adjustment')
        #  Now remove the changes from the model state
        for name, var in self.state.items():
            var -= ( (tendencies['implicit'][name] + tendencies['explicit'][name]) *
                    self.timestep)
        #  Sum up all subprocess tendencies
        for proctype in ['explicit', 'implicit', 'adjustment']:
            for varname, tend in tendencies[proctype].items():
                self.tendencies[varname] += tend
        # Finally compute my own tendencies, if any
        self_tend = self._compute()
        #  Adjustment processes _compute method returns absolute adjustment
        #  Needs to be converted to rate of change
        if self.time_type is 'adjustment':
            for varname, adj in self_tend.items():
                self_tend[varname] /= self.timestep
        for varname, tend in self_tend.items():
            self.tendencies[varname] += tend
        return self.tendencies