docstr: Non-existent files, files outside static directory and symlinks pointing to
  files outside static directory and directories should return 404.
docstr_tok: ["Non-existent","files",",","files","outside","static","directory","and","symlinks","pointing","to","files","outside","static","directory","and","directories","should","return","404","."]
code: def test_staticfiles_404(self):
      """Non-existent files, files outside static directory and symlinks pointing to
      files outside static directory and directories should return 404.
      """
      responses = [
          # Access to directory without trailing slash
          self.fetch("/app/static"),
          # Access to directory with trailing slash
          self.fetch("/app/static/"),
          # Access to file outside static directory
          self.fetch("/app/static/../test_file_outside_directory.py"),
          # Access to file outside static directory with same prefix
          self.fetch(
              f"/app/static/{self._tmpdir.name}_foo/test_file_outside_directory.py"
          ),
          # Access to symlink outside static directory
          self.fetch(f"/app/static/{self._symlink_outside_directory}"),
          # Access to non-existent file
          self.fetch("/app/static/nonexistent.jpg"),
      ]
      for r in responses:
          assert r.code == 404
          assert (
              r.body == b"<html><title>404: Not Found</title>"
              b"<body>404: Not Found</body></html>"
          )
  
file_path: streamlit/lib/tests/streamlit/web/server/app_static_file_handler_test.py
imports: import os
  import tempfile
  from unittest.mock import MagicMock, patch
  import tornado.httpserver
  import tornado.testing
  import tornado.web
  import tornado.websocket
  from streamlit.web.server.app_static_file_handler import MAX_APP_STATIC_FILE_SIZE, AppStaticFileHandler
label_desc: Use image node_id 8 for calling the AppStaticFileHandlerTest obj's underlying member method code with example usage: obj.test_staticfiles_404() without return types