code: def test_walkpackages_filesys(self):
      pkg1 = "test_walkpackages_filesys"
      pkg1_dir = os.path.join(self.dirname, pkg1)
      os.mkdir(pkg1_dir)
      f = open(os.path.join(pkg1_dir, "__init__.py"), "wb")
      f.close()
      os.mkdir(os.path.join(pkg1_dir, "sub"))
      f = open(os.path.join(pkg1_dir, "sub", "__init__.py"), "wb")
      f.close()
      f = open(os.path.join(pkg1_dir, "sub", "mod.py"), "wb")
      f.close()
  
      # Now, to juice it up, let's add the opposite packages, too.
      pkg2 = "sub"
      pkg2_dir = os.path.join(self.dirname, pkg2)
      os.mkdir(pkg2_dir)
      f = open(os.path.join(pkg2_dir, "__init__.py"), "wb")
      f.close()
      os.mkdir(os.path.join(pkg2_dir, "test_walkpackages_filesys"))
      f = open(
          os.path.join(
              pkg2_dir, "test_walkpackages_filesys", "__init__.py"
          ),
          "wb",
      )
      f.close()
      f = open(
          os.path.join(pkg2_dir, "test_walkpackages_filesys", "mod.py"),
          "wb",
      )
      f.close()
  
      expected = [
          "sub",
          "sub.test_walkpackages_filesys",
          "sub.test_walkpackages_filesys.mod",
          "test_walkpackages_filesys",
          "test_walkpackages_filesys.sub",
          "test_walkpackages_filesys.sub.mod",
      ]
      actual = [e[1] for e in pkgutil.walk_packages([self.dirname])]
      self.assertEqual(actual, expected)
  
      for pkg in expected:
          if pkg.endswith("mod"):
              continue
          del sys.modules[pkg]
  
imports: from pathlib import Path
  from test.support.import_helper import unload, CleanImport
  from test.support.warnings_helper import check_warnings, ignore_warnings
  import unittest
  import sys
  import importlib
  from importlib.util import spec_from_file_location
  import pkgutil
  import os
  import os.path
  import tempfile
  import shutil
  import zipfile
label_desc: Use image node_id 7 for calling the PkgutilTests obj's underlying member method code with example usage: obj.test_walkpackages_filesys() without return types