code: def test_silence_warning_already_in_silencers_is_ok(
      mock_warn: MagicMock, mock_error: MagicMock
  ) -> None:
      from bokeh.core.validation.warnings import EXT
  
      m = Mod(foo=-10)
      try:
          silencers0 = v.silence(EXT)  # turn the warning off
          silencers1 = v.silence(EXT)  # do it a second time - no-op
          assert len(silencers0) == 1
          assert silencers0 == silencers1  # silencers is same as before
  
          issues = v.check_integrity([m])
          v.process_validation_issues(issues)
          assert not mock_error.called
          assert not mock_warn.called
      finally:
          v.silence(EXT, False)  # turn the warning back on
          issues = v.check_integrity([m])
          v.process_validation_issues(issues)
          assert not mock_error.called
          assert mock_warn.called
  
imports: from __future__ import annotations
  import pytest
  from typing import Any, cast
  from unittest.mock import MagicMock, patch
  from bokeh.core.properties import Int
  from bokeh.core.validation.check import ValidationIssue, ValidationIssues
  from bokeh.core.validation.issue import Error, Warning
  from bokeh.model import Model
  import bokeh.core.validation
label_desc: Use image node_id 13 for calling a global function with example usage: test_silence_warning_already_in_silencers_is_ok(mock_warn, mock_error) without return types