code: def test_local_filesystem():
      local_fs1 = LocalFileSystem.get_instance()
      local_fs2 = LocalFileSystem.get_instance()
      assert local_fs1 is local_fs2
  
      with tempfile.TemporaryDirectory() as tempdir:
          file_path = os.path.join(tempdir, "test")
  
          with open(file_path, "wb") as f:
              f.write(b"text for test")
          assert local_fs1.stat(tempdir)["type"] == "directory"
          assert local_fs1.stat(file_path)["type"] == "file"
          assert len(glob(tempdir + "*")) == 1
  
file_path: mars/mars/lib/filesystem/tests/test_filesystem.py
imports: import glob
  import os
  import tempfile
  import numpy
  import pytest
  from ....tests.core import require_hadoop
  from ....utils import lazy_import
  from ..None import glob, FileSystem, LocalFileSystem, FSMap
label_desc: Use image node_id 2 for calling a global function with example usage: test_local_filesystem() without return types