How can I read hdf5 files. and plot them as images

I have this dataset for moon craters in hdf5 format
https://zenodo.org/record/1133969/files/train_craters.hdf5?download=1
but I did not know how to read them and see the images inside this dataset

Answer

For the part Reading a HDF5 file it’s a duplicate question, I think, from this post : How to read HDF5 files in Python

For the plot part, I advise you to check matplotlib pyplot documentation and dig in to understand how it works

Documentation : https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.html

Tutorial : https://matplotlib.org/stable/tutorials/introductory/pyplot.html