code: def test_hadoop_methods_3(tmpdir: str):
      data = ["foo", "bar", "baz"]
      data.extend(map(str, range(100)))
  
      with hadoop_open(f"{tmpdir}/test_out.txt.gz", "w") as f:
          for d in data:
              f.write(d)
              f.write("\n")
  
      hadoop_copy(
          f"{tmpdir}/test_out.txt.gz", f"{tmpdir}/test_out.copy.txt.gz"
      )
  
      with hadoop_open(f"{tmpdir}/test_out.copy.txt.gz") as f:
          data4 = [line.strip() for line in f]
  
      assert data == data4
  
      print(f"contents of my tmpdir, {tmpdir}:")
      print(repr(hadoop_ls(tmpdir)))
  
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 5 for calling a global function with example usage: test_hadoop_methods_3(tmpdir) without return types