code: def ranges_overlap(lhs_range, rhs_range):
      if isinstance(lhs_range, dict) and isinstance(rhs_range, dict):
          return (
              lhs_range[END] > rhs_range[START]
              and lhs_range[START] < rhs_range[END]
          )
      elif isinstance(lhs_range, (tuple, list)) and isinstance(
          rhs_range, (tuple, list)
      ):
          return (
              lhs_range[1] > rhs_range[0]
              and lhs_range[0] < rhs_range[1]
          )
      else:
          raise TypeError(
              "Cannot check overlap on objects of type: %s and %s"
              % (type(lhs_range), type(rhs_range))
          )
  
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 3 for calling a global function with example usage: ranges_overlap(lhs_range, rhs_range) and returns: unknown, unknown