code: def test_list_directory_on_file() -> None:
      root = os.path.join(
          os.path.dirname(__file__), "fixtures", "root.txt"
      )
      assert os.path.exists(root)
      with pytest.raises(NotADirectoryError, match=root):
          storage.StorageManager._list_directory(root)
  
imports: import os
  from typing import Optional
  from unittest import mock
  import pytest
  from determined import core
  from determined.common import storage
label_desc: Use image node_id 6 for calling a global function with example usage: test_list_directory_on_file() without return types