code: def get_per_pixel_mean(self, names=('train', 'test')):
          
          for name in names:
              assert name in ['train', 'test'], name
          train_files, test_files, _ = get_filenames(self.dir, self.cifar_classnum)
          all_files = []
          if 'train' in names:
              all_files.extend(train_files)
          if 'test' in names:
              all_files.extend(test_files)
          all_imgs = [x[0] for x in read_cifar(all_files, self.cifar_classnum)]
          arr = np.array(all_imgs, dtype='float32')
          mean = np.mean(arr, axis=0)
          return mean
docs: Args:
              names (tuple[str]): the names ('train' or 'test') of the datasets
  
          Returns:
              a mean image of all images in the given datasets, with size 32x32x3