human
I wrote the below code

    def image_summary(name, image):
        if (not thread_id):
            tf.summary.image(name, tf.expand_dims(image, 0))
    with tf.name_scope('decode', values=[encoded_image]):
        if (image_format == 'jpeg'):
            image = tf.image.decode_jpeg(encoded_image, channels=3)
        elif (image_format == 'png'):
            image = tf.image.decode_png(encoded_image, channels=3)
        else:
            raise ValueError(('Invalid    image    format:    %s' % image_format))
    image = tf.image.convert_image_dtype(image, dtype=tf.float32)
    image_summary('original_image', image)
    assert ((resize_height > 0) == (resize_width > 0))
    if resize_height:
        image = tf.image.resize_images(image, size=[resize_height, resize_width], method=tf.image.ResizeMethod.BILINEAR)
    if is_training:
        image = tf.random_crop(image, [height, width, 3])
    else:
        image = tf.image.resize_image_with_crop_or_pad(image, height, width)
    image_summary('resized_image', image)
    if is_training:
        image = distort_image(image, thread_id)
    image_summary('final_image', image)
    image = tf.subtract(image, 0.5)
    image = tf.multiply(image, 2.0)
    return image

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

def process_image(encoded_image, is_training, height, width, resize_height=346, resize_width=346, thread_id=0, image_format='jpeg'):