class_docstr: Filter duplicate log messages based on filter_targets
  
  Example usage:
      dup_filter = DuplicateFilter(['a'])
      logger.addFilter(dup_filter)
      for i in range(10):
          logger.info('a') # will only log once
          logger.info('abc') # will log 10 times
      dup_filter.attach_filter_targets('abc')
      for i in range(10):
          logger.info('abc') # will only log once now
      dup_filter.clear_filter_targets() # nothing filtered anymore
code: def __init__(self, filter_targets=[]):
      self.msgs = set()
      self.filter_targets = set(filter_targets)
  
file_path: autogluon/common/src/autogluon/common/utils/log_utils.py
imports: import logging
  from typing import Optional
label_desc: Use image node_id 1 to create a new DuplicateFilter object from inherited base classes: object with example: obj = DuplicateFilter(filter_targets)