code: def fields(config: ConfigBase) -> list[dataclasses.Field]:
      # Similar to `dataclasses.fields()`, but use `typing.get_types_hints()` to get `field.type`.
      # This is useful when postponed evaluation is enabled.
      ret = [copy.copy(field) for field in dataclasses.fields(config)]
      types = get_type_hints(type(config))
      for field in ret:
          field.type = types[field.name]
      return ret
  
imports: from __future__ import annotations
  import copy
  import dataclasses
  import importlib
  import json
  import os.path
  from pathlib import Path
  import socket
  from typing import TYPE_CHECKING, get_type_hints
  import typeguard
  import nni.runtime.config
  from .public import is_missing
label_desc: Use image node_id 7 for calling a global function with example usage: fields(config) and returns: ret