docstr: We can safely call `add` from multiple threads simultaneously.
docstr_tok: ["We","can","safely","call","`","add","`","from","multiple","threads","simultaneously","."]
code: def test_add_file_multiple_threads(self):
      """We can safely call `add` from multiple threads simultaneously."""
  
      def add_file(ii: int) -> None:
          coord = random_coordinates()
          data = bytes(f"{ii}", "utf-8")
          self.media_file_manager.add(data, "image/png", coord)
  
      call_on_threads(add_file, num_threads=self.NUM_THREADS)
      self.assertEqual(
          self.NUM_THREADS, len(self.media_file_manager._file_metadata)
      )
  
imports: import random
  import unittest
  from typing import Optional
  from unittest import TestCase, mock
  from unittest.mock import MagicMock, call, mock_open
  from streamlit.runtime.media_file_manager import MediaFileManager
  from streamlit.runtime.media_file_storage import MediaFileKind
  from streamlit.runtime.memory_media_file_storage import MemoryFile, MemoryMediaFileStorage, _calculate_file_id
  from tests.exception_capturing_thread import call_on_threads
label_desc: Use image node_id 2 for calling the MediaFileManagerThreadingTest obj's underlying member method code with example usage: obj.test_add_file_multiple_threads() without return types