code: def test_gfile_GFile_readable(fs, patchs, monkeypatch):
      uri, path_to, _, write, _, _, _ = fs
      mock_patchs(monkeypatch, patchs)
  
      fname = path_to("test_gfile_GFile_readable")
  
      body = get_readable_body(uri)
      lines = body.splitlines(True)
      write(fname, body)
  
      # Simple
      with tf.io.gfile.GFile(fname, "rb") as f:
          file_read = f.read()
          assert file_read == body
  
      # Notfound
      # TODO(vnvo2409): `az` should raise `tf.errors.NotFoundError`.
      if uri != AZ_URI:
          with pytest.raises(tf.errors.NotFoundError):
              fname_not_found = fname + "_not_found"
              with tf.io.gfile.GFile(fname_not_found, "rb") as f:
                  _ = f.read()
  
      # Read length
      with tf.io.gfile.GFile(fname, "rb") as f:
          read_length = 10
          file_read = f.read(read_length)
          assert file_read == body[:read_length]
  
          file_read = f.read()
          assert file_read == body[read_length:]
  
      # Readline
      with tf.io.gfile.GFile(fname, "rb") as f:
          line_count = 0
          while True:
              line = f.readline()
              if not line:
                  break
              line_count += 1
              assert line == lines[line_count - 1]
          assert line_count == len(lines)
  
      # Readlines
      with tf.io.gfile.GFile(fname, "rb") as f:
          gfile_lines = f.readlines()
          assert gfile_lines == lines
  
      # Seek/Tell
      with tf.io.gfile.GFile(fname, "rb") as f:
          assert f.size() == len(body)
          if f.seekable():
              seek_size = 15
              read_length = 10
              f.seek(seek_size)
              file_read = f.read(read_length)
              assert f.tell() == seek_size + read_length
              assert (
                  file_read == body[seek_size : seek_size + read_length]
              )
  
imports: import functools
  import os
  import posixpath
  import random
  import socket
  import sys
  import time
  from urllib.parse import urlparse
  import pytest
  import tensorflow
  import tensorflow_io
label_desc: Use image node_id 15 for calling a global function with example usage: test_gfile_GFile_readable(fs, patchs, monkeypatch) without return types