code: def validate_label(f):
      @wraps(f)
      def wrapper(label, *args, **kwargs):
          is_real_string = isinstance(label, (str, bytes))
          is_literal_string = isinstance(label, Literal) and isinstance(
              label.obj, (str, bytes)
          )
          if not is_real_string and not is_literal_string:
              raise TypeError("require string label")
          return f(label, *args, **kwargs)
  
      return wrapper
  
imports: from functools import partial, wraps
  from .base import DuplicateLabel
  from .pyll.base import Apply, Literal, MissingArgument
  from .pyll import scope
  from .pyll import as_apply
label_desc: Use image node_id 1 for calling a global function with example usage: validate_label(f) and returns: wrapper, f