code: def set_op_by_name(layer, name, new_module):
      levels = name.split(".")
      if len(levels) > 1:
          mod_ = layer
          for l_idx in range(len(levels) - 1):
              if levels[l_idx].isdigit():
                  mod_ = mod_[int(levels[l_idx])]
              else:
                  mod_ = getattr(mod_, levels[l_idx])
          setattr(mod_, levels[-1], new_module)
      else:
          setattr(layer, name, new_module)
  
file_path: BigDL/python/llm/src/bigdl/llm/transformers/awq/awq.py
imports: import gc
  import os
  from tqdm import tqdm
  import torch
  import torch.nn
  from transformers.models.bloom.modeling_bloom import BloomForCausalLM
  from transformers.models.opt.modeling_opt import OPTForCausalLM
  from transformers.models.llama.modeling_llama import LlamaForCausalLM
  from transformers.models.bloom.modeling_bloom import BloomBlock
  from transformers import AwqConfig, AutoConfig
  from bigdl.llm.transformers.awq.linear import WQLinear_GEMM, WQLinear_GEMV
  from huggingface_hub import snapshot_download
  from bigdl.llm.utils.common import invalidInputError
label_desc: Use image node_id 1 for calling a global function with example usage: set_op_by_name(layer, name, new_module) without return types