code: def test_genome_phred_sequences_to_probability():
      """Test conversion of phred qualities to probabilities"""
      tf.compat.v1.disable_eager_execution()
      fastq_path = os.path.join(
          os.path.dirname(os.path.abspath(__file__)),
          "test_genome",
          "test.fastq",
      )
      example_quality_list = [b"BB<", b"ABFF"]
      expected_probabilities = [
          0.0005011872854083776,
          0.0005011872854083776,
          0.0019952619913965464,
          0.0006309572490863502,
          0.0005011872854083776,
          0.00019952621369156986,
          0.00019952621369156986,
      ]
  
      with tf.compat.v1.Session() as sess:
          example_quality = tf.constant(example_quality_list)
          converted_phred = tfio.genome.phred_sequences_to_probability(
              example_quality
          )
          out = sess.run(converted_phred)
  
      # Compare flat values
      assert np.allclose(
          out.flat_values.flatten(), expected_probabilities
      )
      # Ensure nested array lengths are correct
      assert np.all(
          [
              len(a) == len(b)
              for a, b in zip(out.to_list(), example_quality_list)
          ]
      )
  
file_path: io/tests/test_genome_v1.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