docstr: `remove_session_files` is thread-safe.
docstr_tok: ["`","remove_session_files","`","is","thread-safe","."]
code: def test_remove_session_files(self):
      """`remove_session_files` is thread-safe."""
      # Add a bunch of files, each to a different session
      file_ids = []
      for ii in range(self.NUM_THREADS):
          file = UploadedFileRec(
              file_id=f"id_{ii}",
              name=f"file_{ii}",
              type="type",
              data=b"123",
          )
          self.mgr.add_file(f"session_{ii}", file)
          file_ids.append(file.file_id)
  
      # Have each thread remove its session's file
      def remove_session_files(index: int) -> None:
          session_id = f"session_{index}"
          # Our file should exist
          session_files = self.mgr.get_files(
              session_id, [f"id_{index}"]
          )
          self.assertEqual(1, len(session_files))
          self.assertEqual(file_ids[index], session_files[0].file_id)
  
          # Remove session files
          self.mgr.remove_session_files(session_id)
  
          # Our file should no longer exist
          session_files = self.mgr.get_files(
              session_id, [f"id_{index}"]
          )
          self.assertEqual(0, len(session_files))
  
      call_on_threads(
          remove_session_files, num_threads=self.NUM_THREADS
      )
  
file_path: streamlit/lib/tests/streamlit/runtime/uploaded_file_manager_test.py
imports: import unittest
  from streamlit.runtime.memory_uploaded_file_manager import MemoryUploadedFileManager
  from streamlit.runtime.stats import CacheStat
  from streamlit.runtime.uploaded_file_manager import UploadedFileRec
  from tests.exception_capturing_thread import call_on_threads
label_desc: Use image node_id 4 for calling the UploadedFileManagerThreadingTest obj's underlying member method code with example usage: obj.test_remove_session_files() without return types