<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_hdf(cls, filename):
 """Load camera model params from a HDF5 file The HDF5 file should contain the following datasets: wc : (2,) float with distortion center lgamma : float distortion parameter readout : float readout value size : (2,) int image size fps : float frame rate K : (3, 3) float camera matrix Parameters filename : str Path to file with parameters Returns AtanCameraModel Camera model instance """

        import h5py
        with h5py.File(filename, 'r') as f:
            wc = f["wc"].value
            lgamma = f["lgamma"].value
            K = f["K"].value
            readout = f["readout"].value
            image_size = f["size"].value
            fps = f["fps"].value
            instance = cls(image_size, fps, readout, K, wc, lgamma)
            return instance