def test_reuse_same_name():
        """Reusing a cached_property on different classes under the same name is OK."""
        counter = 0

        @cached_property
        def _cp(_self):
            nonlocal counter
            counter += 1
            return counter

        class A:  # NOSONAR
            """Test class 1."""

            cp = _cp

        class B:  # NOSONAR
            """Test class 2."""

            cp = _cp

        a = A()
        b = B()

        assert a.cp == 1
        assert b.cp == 2
        assert a.cp == 1
Reusing a cached_property on different classes under the same name is OK.
tests/core/serve/test_compat/test_cached_property.py