code: def get_default_params(some_class):
      params = dict()
      for mclass in some_class.mro():
          if mclass is nn.Layer or mclass is object:
              continue
  
          mclass_params = inspect.signature(mclass.__init__).parameters
          for pname, param in mclass_params.items():
              if param.default != param.empty and pname not in params:
                  params[pname] = param
  
      return params
  
file_path: PaddleSeg/EISeg/eiseg/util/serialization.py
imports: from functools import wraps
  from copy import deepcopy
  import inspect
  import paddle.nn
label_desc: Use image node_id 4 for calling a global function with example usage: get_default_params(some_class) and returns: params