def replace_cpi_escapes(cpi: str) -> str:
    """Replace escaped characters in CPI URIs

    Args:
        cpi (str): CPI pure identity URI

    Returns:
        str: CPI escaped URI
    """
    return cpi.replace("%23", "#").replace("%2F", "/")