<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def snake_to_pascal(snake_str):
    '''
    Convert `snake_str` from snake_case to PascalCase
    '''
    components = snake_str.split('_')
    if len(components) > 1:
        camel = ''.join(x.title() for x in components)
        return camel
    # Not snake_case
    return snake_str