human
I wrote the below code

    def write_grid(grid, global_step):
        'Native    python    function    to    call    for    writing    images    to    files.'
        if ((global_step % summary_freq) == 0):
            img_path = os.path.join(log_dir, ('%s.jpg' % str(global_step)))
            utils.save_image(grid, img_path)
        return 0
    grid = _build_image_grid(input_images, output_images, pred_images, pred_masks)
    slim.summaries.add_image_summary(tf.expand_dims(grid, axis=0), name='grid_vis')
    save_op = tf.py_func(write_grid, [grid, global_step], [tf.int64], 'write_grid')[0]
    return save_op

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def write_disk_grid(global_step, summary_freq, log_dir, input_images, output_images, pred_images, pred_masks):