<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_state(self, fname=None):
 """Loads state from pickle"""

        with open(fname, 'rb') as fh:
            self.state = pickle.load(fh)