You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: image_intensity_histograms.m
    path of file: ./repos/CanlabCore/CanlabCore/diagnostics
    
    the code of the file until where you have to start completion: function [noreturn] = image_intensity_histograms(fout, imgs, varargin)
%   Makes a sheet (fout.png) of intensity distribution histograms of imgs.
%   Will put an even number of rows of subplots on each page saved.

    
function [noreturn] = image_intensity_histograms(fout, imgs, varargin)
%   Makes a sheet (fout.png) of intensity distribution histograms of imgs.
%   Will put an even number of rows of subplots on each page saved.
%   If more than one page is needed, will title outputs fout_1.png, etc.
%
% :Usage:
% ::
%
%     image_intensity_histograms(fout, imgs, [options])
%
% :Inputs:
%
%   **fout:**
%        imfilename to be saved ('.png' will be append