code: def test_duplicate_factors_raises_validation_error(self) -> None:
      r = FactorRange("foo", "bar", "foo")
      with mock.patch("bokeh.core.validation.check.log") as mock_logger:
          issues = check_integrity([r])
          process_validation_issues(issues)
      assert mock_logger.error.call_count == 1
  
      r = FactorRange(
          factors=[("foo", "a"), ("foo", "b"), ("foo", "a")]
      )
      with mock.patch("bokeh.core.validation.check.log") as mock_logger:
          issues = check_integrity([r])
          process_validation_issues(issues)
      assert mock_logger.error.call_count == 1
  
      r = FactorRange(
          factors=[
              ("foo", "a", "1"),
              ("foo", "a", "2"),
              ("foo", "a", "1"),
          ]
      )
      with mock.patch("bokeh.core.validation.check.log") as mock_logger:
          issues = check_integrity([r])
          process_validation_issues(issues)
      assert mock_logger.error.call_count == 1
  
imports: from __future__ import annotations
  import pytest
  import datetime
  from math import isnan
  from unittest import mock
  from bokeh.core.validation import check_integrity, process_validation_issues
  from _util_models import check_properties_existence
  from bokeh.models import Range1d, DataRange1d, FactorRange
label_desc: Use image node_id 6 for calling the Test_FactorRange obj's underlying member method code with example usage: obj.test_duplicate_factors_raises_validation_error() without return types