code: def not_empty(value: Optional[T], component_name: str, url: str) -> T:
      """Helper to check the value is not None - otherwise raise a helpful exception."""
      if not value:
          raise ValueError(f"Missing {component_name} in {url}")
      else:
          return value
  
imports: from __future__ import annotations
  from typing import Optional, TypeVar
  from dbt_semantic_interfaces.enum_extension import ExtendedEnum
label_desc: Use image node_id 1 for calling a global function with example usage: not_empty(value, component_name, url) and returns: value