code: def _fixup_class_init(some_class) -> None:
      """
      In-place modification of the some_class class which happens
      after dataclass processing.
  
      If the dataclass some_class inherits torch.nn.Module, then
      makes torch.nn.Module's __init__ be called before anything else
      on instantiation of some_class.
      This is a bit like attr's __pre_init__.
      """
  
      assert _is_actually_dataclass(some_class)
      try:
          import torch
      except ModuleNotFoundError:
          return
  
      if not issubclass(some_class, torch.nn.Module):
          return
  
      def init(self, *args, **kwargs) -> None:
          torch.nn.Module.__init__(self)
          getattr(self, _DATACLASS_INIT)(*args, **kwargs)
  
      assert _DATACLASS_INIT not in some_class.__dict__
  
      setattr(some_class, _DATACLASS_INIT, some_class.__init__)
      some_class.__init__ = init
  
imports: import dataclasses
  import inspect
  import itertools
  import sys
  import warnings
  from collections import Counter, defaultdict
  from enum import Enum
  from functools import partial
  from typing import Any, Callable, Dict, get_args, get_origin, List, Optional, Tuple, Type, TypeVar, Union
  from omegaconf import DictConfig, OmegaConf, open_dict
label_desc: Use image node_id 14 for calling a global function with example usage: _fixup_class_init(some_class) without return types