code: def has_duplicate_resource(queues: dict):
      """queues: dict[name] -> [(resource, count), (resource, count) ...]"""
      seen = set()
      for name, _ in chain.from_iterable(queues.values()):
          if name in seen:
              return True
          seen.add(name)
      return False
  
imports: import re
  from collections import defaultdict, deque
  from enum import Enum
  from itertools import chain
  from threading import Event, Thread
  from time import sleep, time
  import attr
  from attr.validators import instance_of
  from .cloud_driver import CloudDriver
  from ..None import Task
  from ..backend_api import Session
  from ..backend_api.session import defs
  from ..backend_api.session.client import APIClient
  from ..debugging import get_logger
label_desc: Use image node_id 3 for calling a global function with example usage: has_duplicate_resource(queues) and returns: False, True