def case_pattern(content, new_word):
    """
    Determines the uppercase and lowercase pattern of a token and applies it to
    another

    Inputs:
        content     str     Token to replace
        new_word    str     New token, apply here the upper/lowercase pattern
    
    Output:
        new_word    str     New token with appropiate upper/lowercase pattern
    """
    if content.isupper():
        new_word = new_word.upper()
    elif content.islower():
        new_word = new_word.lower()
    else:
        new_word = new_word.title()
    return new_word