def test_conversion(self):
        """Ensures  completion logprobs are converted correctly."""
        logprobs = {
            "tokens": ["Hello", "world"],
            "token_logprobs": [-0.1, -0.2],
            "top_logprobs": [
                {"Hello": -0.1, "Hi": -1.0},
                {"world": -0.2, "earth": -1.2},
            ],
        }
        expected_result = [
            [
                LogProb(token="Hello", logprob=-0.1, bytes=[]),
                LogProb(token="Hi", logprob=-1.0, bytes=[]),
            ],
            [
                LogProb(token="world", logprob=-0.2, bytes=[]),
                LogProb(token="earth", logprob=-1.2, bytes=[]),
            ],
        ]
        result = _from_completion_logprobs_dict(logprobs)
        assert result == expected_result
Ensures  completion logprobs are converted correctly.
llama-index-integrations/llms/llama-index-llms-oci-data-science/tests/test_oci_data_science_utils.py