human
I wrote the below code

    if ((depth < 0) or (not isinstance(depth, ((int, long) if six.PY2 else int)))):
        raise ValueError('`depth`    must    be    a    non-negative    integer.')
    if ((left_pad < 0) or (not isinstance(left_pad, ((int, long) if six.PY2 else int)))):
        raise ValueError('`left_pad`    must    be    a    non-negative    integer.')
    if (depth == 0):
        return None
    if (len(indices.get_shape().as_list()) != 1):
        raise ValueError('`indices`    must    have    rank    1')
    def one_hot_and_pad():
        one_hot = tf.cast(tf.one_hot(tf.cast(indices, tf.int64), depth, on_value=1, off_value=0), tf.float32)
        return tf.pad(one_hot, [[0, 0], [left_pad, 0]], mode='CONSTANT')
    result = tf.cond(tf.greater(tf.size(indices), 0), one_hot_and_pad, (lambda : tf.zeros(((depth + left_pad), 0))))
    return tf.reshape(result, [(-1), (depth + left_pad)])

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

def padded_one_hot_encoding(indices, depth, left_pad):