def pad_name(text, pad_length):
    """Pad text to the pad length with the character."""
    if len(text) % 2 == 0:
        return '{:^{length}}'.format(' ' + text, length=pad_length)
    else:
        return '{:^{length}}'.format(text, length=pad_length)
