code: def create_main_params(model):
      # flatten_dense_tensors returns a contiguous flat array.
      # http://pytorch.org/docs/master/_modules/torch/_utils.html
      main_params = _flatten_dense_tensors(
          [param.data for param in model.parameters()]
      ).float()
      main_params = torch.nn.Parameter(main_params)
      main_params.requires_grad = True
      # main_params.register_hook(backwards_debug_hook)
      if main_params.grad is None:
          main_params.grad = main_params.new(*main_params.size())
      return main_params
  
imports: import torch
  import torch.nn
  from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors
label_desc: Use image node_id 6 for calling a global function with example usage: create_main_params(model) and returns: main_params