code: def _convert_fields(module, init: bool):
      for field in dataclasses.fields(module):
          if field.init is init:
              try:
                  converter = field.metadata["converter"]
              except KeyError:
                  pass
              else:
                  try:
                      value = getattr(module, field.name)
                  except AttributeError:
                      # Let the all-fields-are-filled check handle the error.
                      pass
                  else:
                      setattr(module, field.name, converter(value))
  
imports: import abc
  import dataclasses
  import functools
  import inspect
  import types
  import warnings
  import weakref
  from collections.abc import Callable
  from typing import Any, cast, Optional, Protocol, TYPE_CHECKING, TypeVar, Union
  from typing_extensions import dataclass_transform, ParamSpec
  import jax._src.traceback_util
  import jax.tree_util
  import numpy
  from jaxtyping import Array, Bool, PyTreeDef
  from ._better_abstract import ABCMeta, dataclass
  from ._caches import internal_lru_caches
  from ._doc_utils import doc_repr
  from ._pretty_print import tree_pformat
  from ._tree import tree_equal
label_desc: Use image node_id 7 for calling a global function with example usage: _convert_fields(module, init) without return types