code: def set_param(torch_layer, weight, bias=None):
      # set parameter of one layer
      assert (
          torch_layer.weight.shape == weight.shape
      ), f"{torch_layer} layer.weight does not match"
      torch_layer.weight = nn.Parameter(weight)
      if bias is not None:
          assert (
              torch_layer.bias.shape == bias.shape
          ), f"{torch_layer} layer.bias does not match"
          torch_layer.bias = nn.Parameter(bias)
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/reformer/convert_reformer_trax_checkpoint_to_pytorch.py
imports: import argparse
  import pickle
  import numpy
  import torch
  from torch import nn
  from transformers import ReformerConfig, ReformerModelWithLMHead
  from transformers.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: set_param(torch_layer, weight, bias) without return types