code: def create_instance(
      data_class: Type[T], init_values: Data, post_init_values: Data
  ) -> T:
      instance = data_class(**init_values)
      for key, value in post_init_values.items():
          setattr(instance, key, value)
      return instance
  
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 2 for calling a global function with example usage: create_instance(data_class, init_values, post_init_values) and returns: instance