code: def test_genome_phred_sequences_to_probability():
      """Test conversion of phred qualities to probabilities"""
      example_quality_list = [b"BB<", b"ABFF"]
      expected_probabilities = [
          0.0005011872854083776,
          0.0005011872854083776,
          0.0019952619913965464,
          0.0006309572490863502,
          0.0005011872854083776,
          0.00019952621369156986,
          0.00019952621369156986,
      ]
  
      example_quality = tf.constant(example_quality_list)
      converted_phred = tfio.genome.phred_sequences_to_probability(
          example_quality
      )
  
      # Compare flat values
      assert np.allclose(
          converted_phred.flat_values.numpy().flatten(),
          expected_probabilities,
      )
      # Ensure nested array lengths are correct
      assert np.all(
          [
              len(a) == len(b)
              for a, b in zip(
                  converted_phred.to_list(), example_quality_list
              )
          ]
      )
  
file_path: io/tests/test_genome.py
imports: import os
  import numpy
  import pytest
  import tensorflow
  import tensorflow_io
label_desc: Use image node_id 3 for calling a global function with example usage: test_genome_phred_sequences_to_probability() without return types