code: def test_file_close_exception(extension):
      with pytest.raises(ZeroDivisionError) as excinfo:
          with create_temp_with_dir(
              "tmp{}".format(extension)
          ) as filename:
              with get_file_handle_save(filename, ext=extension) as f:
                  file_handler = f
                  1 / 0
      assert file_handler.closed
  
      with pytest.raises(ZeroDivisionError) as excinfo:
          with create_temp_with_dir(
              "tmp{}".format(extension)
          ) as filename:
              # create a file at first
              with open(filename, "w") as f:
                  f.write("\n")
  
              with get_file_handle_load(
                  None, filename, ext=extension
              ) as f:
                  file_handler = f
                  1 / 0
      assert file_handler.closed
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_file_close_exception(extension) without return types