def run_replace(block: str, replace_dict: dict) -> str:
    """Replace routine for dealing with n-grams.

    :param block: Contains the text block replacement is done on
    :param replace_dict: {token: replacement_token}

    :return: Occurrences of token replaced with replacement_token
    """
    for k in replace_dict.keys():
        if k in block:
            block = block.replace(k, replace_dict[k])
    return block