<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_file(cls, f):
 """Load the history of a ``NeuralNet`` from a json file. Parameters f : file-like object or str """


        with open_file_like(f, 'r') as fp:
            return cls(json.load(fp))