Draw histogram and save it as an image - Python script using ESA SNAP, not matplotlib

Yes, I use snappy, but I am not aware of methods/functions from snappy for drawing histograms or basic descriptive statistics calculations.