code: def spec_contains(d: dict[str, Any], types) -> bool:
      """Returns true if the spec contains any field with one of these types."""
      return bool(find_spec_keys(d, types))
  
imports: from collections.abc import Callable, Collection, Iterable, Iterator, Mapping, Sequence
  import itertools
  import queue
  import threading
  import time
  from typing import Any, Optional, TypeVar, Union
  import uuid
  from lit_nlp.api import types
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: spec_contains(d, types) and returns: bool