code: def deduplicate_overlapping_items(items, overlap_fn, sort_key_fn):
      """Deduplicates the items by looping over the items, sorted using
      sort_key_fn, and checking overlaps with previously seen items using
      overlap_fn
      """
      sorted_items = sorted(items, key=sort_key_fn)
      deduplicated_items = []
      for item in sorted_items:
          if not any(
              overlap_fn(item, dedup_item)
              for dedup_item in deduplicated_items
          ):
              deduplicated_items.append(item)
      return deduplicated_items
  
imports: from __future__ import unicode_literals
  import importlib
  import json
  import numbers
  import re
  from builtins import bytes, str
  from datetime import datetime
  from functools import wraps
  from pathlib import Path
  from future.utils import text_type
  from snips_nlu.constants import END, ENTITY_KIND, RES_MATCH_RANGE, RES_VALUE, START
  from snips_nlu.exceptions import NotTrained, PersistingError
label_desc: Use image node_id 12 for calling a global function with example usage: deduplicate_overlapping_items(items, overlap_fn, sort_key_fn) and returns: deduplicated_items