code: def _cow_validator(val):
      if get_option("spill") and val:
          raise ValueError(
              "Copy-on-write is not supported when spilling is enabled. "
              "Please set `spill` to `False`"
          )
      if val not in {False, True}:
          raise ValueError(
              f"{val} is not a valid option. Must be one of {{False, True}}."
          )
  
imports: import os
  import textwrap
  from collections.abc import Container
  from contextlib import ContextDecorator
  from dataclasses import dataclass
  from typing import Any, Callable, Dict, Optional
label_desc: Use image node_id 9 for calling a global function with example usage: _cow_validator(val) without return types