code: def test_gfile_isdir(fs, patchs, monkeypatch):
      _, path_to, _, write, mkdirs, join, _ = fs
      mock_patchs(monkeypatch, patchs)
  
      root_path = "test_gfile_isdir"
      dname = path_to(root_path)
      fname = join(dname, "fname")
  
      mkdirs(dname)
      write(fname, b"123456789")
  
      assert tf.io.gfile.isdir(dname) is True
      assert tf.io.gfile.isdir(fname) is False
  
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 18 for calling a global function with example usage: test_gfile_isdir(fs, patchs, monkeypatch) without return types