code: def _check_valid(key, val, valid):
      """Helper to check valid options"""
      if val not in valid:
          raise ValueError(
              '%s must be one of %s, not "%s"' % (key, valid, val)
          )
  
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 2 for calling a global function with example usage: _check_valid(key, val, valid) without return types