code: def assert_in(candidates, **kwargs):
      def readable_list(iterable):
          iterable = ["`%s`" % x for x in iterable]
          s = ", ".join(iterable[:-1])
          if s:
              s += " and "
          s += iterable[-1]
          return s
  
      for key, value in kwargs.items():
          assert (
              value in candidates
          ), "Unknown %s `%s`, candidates are %s" % (
              key,
              value,
              readable_list(candidates),
          )
  
imports: from __future__ import print_function, absolute_import
  import os
  import sys
  import logging
  import tempfile
  from time import time
  from functools import wraps
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: assert_in(candidates) and returns: s