code: def extract_optional(optional: Type[Optional[T]]) -> T:
      for type_ in extract_generic(optional):
          if type_ is not type(None):
              return type_
      raise ValueError("can not find not-none value")
  
file_path: ray/python/ray/_private/thirdparty/dacite/types.py
imports: from dataclasses import InitVar
  from typing import Type, Any, Optional, Union, Collection, TypeVar, Dict, Callable, Mapping, List, Tuple
label_desc: Use image node_id 4 for calling a global function with example usage: extract_optional(optional) and returns: type_