<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(cls, path):
 """ Load a SOM from a JSON file saved with this package.. Parameters path : str The path to the JSON file. Returns ------- s : cls A som of the specified class. """

        data = json.load(open(path))

        weights = data['weights']
        weights = np.asarray(weights, dtype=np.float64)

        s = cls(data['map_dimensions'],
                data['params']['lr']['orig'],
                data['data_dimensionality'],
                influence=data['params']['infl']['orig'],
                lr_lambda=data['params']['lr']['factor'],
                infl_lambda=data['params']['infl']['factor'])

        s.weights = weights
        s.trained = True

        return s