code: def convert_celeba_aligned_cropped(directory, output_directory,
                                     output_filename=OUTPUT_FILENAME):
      
      output_path = os.path.join(output_directory, output_filename)
      h5file = _initialize_conversion(directory, output_path, (218, 178))
  
      features_dataset = h5file['features']
      image_file_path = os.path.join(directory, IMAGE_FILE)
      with zipfile.ZipFile(image_file_path, 'r') as image_file:
          with progress_bar('images', NUM_EXAMPLES) as bar:
              for i in range(NUM_EXAMPLES):
                  image_name = 'img_align_celeba/{:06d}.jpg'.format(i + 1)
                  features_dataset[i] = numpy.asarray(
                      Image.open(
                          image_file.open(image_name, 'r'))).transpose(2, 0, 1)
                  bar.update(i + 1)
  
      h5file.flush()
      h5file.close()
  
      return (output_path,)
docs: Converts the aligned and cropped CelebA dataset to HDF5.
  
      Converts the CelebA dataset to an HDF5 dataset compatible with
      :class:`fuel.datasets.CelebA`. The converted dataset is saved as
      'celeba_aligned_cropped.hdf5'.
  
      It assumes the existence of the following files:
  
      * `img_align_celeba.zip`
      * `list_attr_celeba.txt`
  
      Parameters
      ----------
      directory : str
          Directory in which input files reside.
      output_directory : str
          Directory in which to save the converted dataset.
      output_filename : str, optional
          Name of the saved dataset. Defaults to
          'celeba_aligned_cropped.hdf5'.
  
      Returns
      -------
      output_paths : tuple of str
          Single-element tuple containing the path to the converted
          dataset.