from typing import List


def pascal_case(word: str) -> str:
    """Converts given word to pascal case.

    >>> pascal_case("someWord")
    "SomeWord"
    """
    items: List[str] = []
    parts = word.split("_")
    contains_underscore = len(parts) > 1
    for part in parts:
        if part:
            if contains_underscore:
                items.append(part.title())
            else:
                first_char, remain_part = part[0], part[1:]
                items.append(first_char.upper() + remain_part)
    return "".join(items)