code: def test_gfile_listdir(fs, patchs, monkeypatch):
      uri, path_to, _, write, mkdirs, join, _ = fs
      mock_patchs(monkeypatch, patchs)
  
      root_path = "test_gfile_listdir"
      dname = path_to(root_path)
      mkdirs(dname)
  
      num_childs = 5
      childrens = [None] * num_childs
      childrens[0] = join(dname, "subdir")
      # TODO(vnvo2409): `gs` filesystem requires `/` at the end of directory's path.
      # Consider if we could change the behavior for matching the other filesystems.
      if uri == GCS_URI:
          childrens[0] += "/"
      mkdirs(childrens[0])
  
      body = b"123456789"
      for i in range(1, num_childs):
          childrens[i] = join(dname, f"child_{i}")
          write(childrens[i], body)
          write(join(childrens[0], f"subchild_{i}"), body)
  
      entries = tf.io.gfile.listdir(dname)
      assert sorted(childrens) == sorted(
          join(dname, entry) for entry in entries
      )
  
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 19 for calling a global function with example usage: test_gfile_listdir(fs, patchs, monkeypatch) without return types