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 attach_filter_targets(self, filter_targets):
      if type(filter_targets) == str:
          filter_targets = [filter_targets]
      for target in filter_targets:
          self.filter_targets.add(target)
  
file_path: autogluon/common/src/autogluon/common/utils/log_utils.py
imports: import logging
  from typing import Optional
label_desc: Use image node_id 3 for calling the DuplicateFilter obj's underlying member method code with example usage: obj.attach_filter_targets(filter_targets) without return types