code: def duplicate_filter_logger(self):
      # token_urlsafe: ensure the logger has a unique name so tests are isolated
      logger = logging.getLogger(__name__ + secrets.token_urlsafe(8))
      logger.setLevel(logging.DEBUG)
      logger.addFilter(DuplicateFilter(logger))
      return logger
  
imports: from __future__ import annotations
  import logging
  import secrets
  import subprocess
  from decimal import Decimal
  from unittest.mock import patch
  import pikepdf
  import pytest
  from PIL import Image, UnidentifiedImageError
  from ocrmypdf._exec.ghostscript import DuplicateFilter, rasterize_pdf
  from ocrmypdf.exceptions import ColorConversionNeededError, ExitCode
  from ocrmypdf.helpers import Resolution
  from .conftest import check_ocrmypdf, run_ocrmypdf_api
label_desc: Use image node_id 1 for calling the TestDuplicateFilter obj's underlying member method code with example usage: obj.duplicate_filter_logger() and returns: logger