code: def coerce_bool(value) -> bool:
      if isinstance(value, (bool, int, float, list, dict)):
          return bool(value)
      elif value is None:
          return False
      elif str(value).lower() in ["", "0", "false"]:
          return False
      else:
          return True
  
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 1 for calling a global function with example usage: coerce_bool(value) and returns: bool, False, False, True