code: def test_given_directory():
      # Test InGivenDirectory
      cwd = getcwd()
      with InGivenDirectory() as tmpdir:
          assert tmpdir == abspath(cwd)
          assert tmpdir == abspath(getcwd())
      with InGivenDirectory(MY_DIR) as tmpdir:
          assert tmpdir == MY_DIR
          assert realpath(MY_DIR) == realpath(abspath(getcwd()))
      # We were deleting the Given directory!  Check not so now.
      assert isfile(MY_PATH)
  
imports: from os import getcwd
  from os.path import abspath, dirname, isfile, realpath
  from ..tmpdirs import InGivenDirectory
label_desc: Use image node_id 1 for calling a global function with example usage: test_given_directory() without return types