code: def get_default_value_for_field(field: Field) -> Any:
      if field.default != MISSING:
          return field.default
      elif field.default_factory != MISSING:  # type: ignore
          return field.default_factory()  # type: ignore
      elif is_optional(field.type):
          return None
      raise DefaultValueNotFoundError()
  
file_path: ray/python/ray/_private/thirdparty/dacite/dataclasses.py
imports: from dataclasses import Field, MISSING, _FIELDS, _FIELD, _FIELD_INITVAR
  from typing import Type, Any, TypeVar, List
  from .data import Data
  from .types import is_optional
label_desc: Use image node_id 1 for calling a global function with example usage: get_default_value_for_field(field) and returns: field, field, None