code: def test_hadoop_stat(tmpdir: str):
      data = ["foo", "bar", "baz"]
      data.extend(map(str, range(100)))
      with hadoop_open(f"{tmpdir}/test_hadoop_stat.txt.gz", "w") as f:
          for d in data:
              f.write(d)
              f.write("\n")
  
      stat1 = hl.hadoop_stat(f"{tmpdir}")
      assert stat1["is_dir"] == True
  
      hadoop_copy(
          f"{tmpdir}/test_hadoop_stat.txt.gz",
          f"{tmpdir}/test_hadoop_stat.copy.txt.gz",
      )
  
      stat2 = hl.hadoop_stat(f"{tmpdir}/test_hadoop_stat.copy.txt.gz")
      # The gzip format permits metadata which makes the compressed file's size unpredictable. In
      # practice, Hadoop creates a 175 byte file and gzip.GzipFile creates a 202 byte file. The 27
      # extra bytes appear to include at least the filename (20 bytes) and a modification timestamp.
      assert stat2["size_bytes"] == 175 or stat2["size_bytes"] == 202
      assert stat2["is_dir"] == False
      assert "path" in stat2
  
imports: from typing import Generator
  import pytest
  import secrets
  import os
  import hail
  import hailtop.fs
  from hail.context import _get_local_tmpdir
  from hail.utils import hadoop_open, hadoop_copy, hadoop_ls
  from hailtop.utils import secret_alnum_string
  from hail.utils.java import FatalError
  from ..helpers import qobtest
label_desc: Use image node_id 9 for calling a global function with example usage: test_hadoop_stat(tmpdir) without return types