human
I wrote the below code

    maxp = float(maxp)
    def log10(x):
        with tf.name_scope('log10'):
            numerator = tf.log(x)
            denominator = tf.log(tf.constant(10, dtype=numerator.dtype))
            return (numerator / denominator)
    mse = tf.reduce_mean(tf.square((prediction - ground_truth)))
    if (maxp is None):
        psnr = tf.multiply(log10(mse), (-10.0), name=name)
    else:
        psnr = tf.multiply(log10(mse), (-10.0))
        psnr = tf.add(tf.multiply(20.0, log10(maxp)), psnr, name=name)
    return psnr

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

def psnr(prediction, ground_truth, maxp=None, name='psnr'):