def METHOD_NAME(identifier: str, collision_prob: float) -> str:
    # assume that shake_128 has perfect collision resistance 2^N/2 then collision prob is 1/resistance: prob = 1/2^N/2, solving for prob
    # take into account that we are case insensitive in base64 so we need ~1.5x more bits (2+1)
    tl_bytes = int(((2+1)*math.log2(1/(collision_prob)) // 8) + 1)
    tag = base64.b64encode(hashlib.shake_128(identifier.encode("utf-8")).digest(tl_bytes)
                           ).rstrip(b"=").translate(NamingConvention._TR_TABLE).lower().decode("ascii")
    return tag