def _is_mocked(obj: object) -> bool:
    """Return if an object is possibly a mock object by checking the
    existence of a highly improbable attribute."""
    return (
        safe_getattr(obj, "pytest_mock_example_attribute_that_shouldnt_exist", None)
        is not None
    )
Return if an object is possibly a mock object by checking the
    existence of a highly improbable attribute.
src/_pytest/doctest.py