The Data already exist. But loading the data properly is the problem this is what i have so far. But it doesn’t really work

import h5py

def load_data(h5py_file):

        with h5py.File(h5py_file,'r') as data:
            video = data['video'][()]
            mouse = data['mouse'][()]
        video = video[:50]
        mouse = mouse[:50]    

        return video,mouse

class CustomMouseDataset():
    """Dataloader for Custom dataset"""
    
    
    
    def __init__(self, h5py_file,transform = None):
        
        self.video,self.mouse = load_data(h5py_file)
    
    def __len__(self):
        
        return len(self.mouse)
    
    def __getitem(self,idx):
        frame = self.video[idx]
        
        mouse = self.mouse[idx]
        
        sample= {'frame': frame, 'mouse': mouse}
        
        if self.transform:
            sample = self.transform(sample)
        return sample