class_docstr: A Range of values for a categorical dimension.
  
  In addition to supplying ``factors`` as a keyword argument to the
  ``FactorRange`` initializer, you may also instantiate with a sequence of
  positional arguments:
  
  .. code-block:: python
  
      FactorRange("foo", "bar") # equivalent to FactorRange(factors=["foo", "bar"])
  
  Users will normally supply categorical values directly:
  
  .. code-block:: python
  
      p.circle(x=["foo", "bar"], ...)
  
  BokehJS will create a mapping from ``"foo"`` and ``"bar"`` to a numerical
  coordinate system called *synthetic coordinates*. In the simplest cases,
  factors are separated by a distance of 1.0 in synthetic coordinates,
  however the exact mapping from factors to synthetic coordinates is
  affected by he padding properties as well as whether the number of levels
  the factors have.
  
  Users typically do not need to worry about the details of this mapping,
  however it can be useful to fine tune positions by adding offsets. When
  supplying factors as coordinates or values, it is possible to add an
  offset in the synthetic coordinate space by adding a final number value
  to a factor tuple. For example:
  
  .. code-block:: python
  
      p.circle(x=[("foo", 0.3), ...], ...)
  
  will position the first circle at an ``x`` position that is offset by
  adding 0.3 to the synthetic coordinate for ``"foo"``.
code: def _check_duplicate_factors(self):
      dupes = [
          item
          for item, count in Counter(self.factors).items()
          if count > 1
      ]
      if dupes:
          return "duplicate factors found: %s" % ", ".join(
              repr(x) for x in dupes
          )
  
imports: from __future__ import annotations
  import logging
  from collections import Counter
  from math import nan
  from ..core.enums import PaddingUnits, StartEnd
  from ..core.has_props import abstract
  from ..core.properties import Auto, Bool, Datetime, Either, Enum, FactorSeq, Float, Instance, List, MinMaxBounds, Null, Nullable, Override, Readonly, Required, TimeDelta
  from ..core.validation import error
  from ..core.validation.errors import DUPLICATE_FACTORS
  from ..model import Model
label_desc: Use image node_id 2 for calling the FactorRange obj's underlying member method code with example usage: obj._check_duplicate_factors() and returns: unknown