code: def code_assembly(param, nn_class, module_name):
      if module_name == "loss":
          parent_class = "FateTorch"
      else:
          parent_class = "FateTorch"
  
      para_str = ""
      non_default_param = ""
      init_str = """"""
      for k, v in param.items():
          new_para = "\n        self.param_dict['{}'] = {}".format(k, k)
          init_str += new_para
          if isinstance(v, Required):
              non_default_param += str(k)
              non_default_param += ", "
              continue
  
          para_str += str(k)
          if isinstance(v, str):
              para_str += "='{}'".format(v)
          else:
              para_str += "={}".format(str(v))
          para_str += ", "
  
      para_str = non_default_param + para_str
  
      init_ = """
      def __init__(self, {}**kwargs):
          {}.__init__(self){}
          self.param_dict.update(kwargs)
          nn.modules.{}.{}.__init__(self, **self.param_dict)
      """.format(
          para_str, parent_class, init_str, module_name, nn_class
      )
  
      code = """
  class {}({}, {}):
          {}
      """.format(
          nn_class,
          "nn.modules.{}.{}".format(module_name, nn_class),
          parent_class,
          init_,
      )
  
      return code
  
file_path: FATE/python/fate/components/components/nn/hook_code/extract_torch_modules.py
imports: import inspect
  from torch.nn.modules import linear, activation, rnn, dropout, sparse, pooling, conv, transformer, batchnorm
  from torch.nn.modules import padding, pixelshuffle
  from torch.nn.modules import loss
label_desc: Use image node_id 3 for calling a global function with example usage: code_assembly(param, nn_class, module_name) and returns: code