code: def _check_conversion(key, valid_dict):
      """Check for existence of key in dict, return value or raise error"""
      if key not in valid_dict and key not in valid_dict.values():
          # Only show users the nice string values
          keys = [v for v in valid_dict.keys() if isinstance(v, str)]
          raise ValueError(
              "value must be one of %s, not %s" % (keys, key)
          )
      return valid_dict[key] if key in valid_dict else key
  
imports: import numpy
  from copy import deepcopy
  from .None import gl
  from ..color import Color
  from ..util import logger
label_desc: Use image node_id 4 for calling a global function with example usage: _check_conversion(key, valid_dict) and returns: unknown