class_docstr: Produces [image, label] in Cifar10/100 dataset,
  image is 32x32x3 in the range [0,255].
  label is an int.
docstr: 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
docstr_tok: ["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"]
code: def get_per_pixel_mean(self, names=("train", "test")):
      """
      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
      """
      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
  
imports: import numpy
  import os
  import pickle
  import tarfile
  from ...utils import logger
  from ...utils.fs import download, get_dataset_path
  from ..base import RNGDataFlow
label_desc: Use image node_id 4 for calling the CifarBase obj's underlying member method code with example usage: obj.get_per_pixel_mean(names) and returns: mean