code: def renew_resnet_paths(old_list, n_shave_prefix_segments=0):
      """
      Updates paths inside resnets to the new naming scheme (local renaming)
      """
      mapping = []
      for old_item in old_list:
          new_item = old_item.replace("in_layers.0", "norm1")
          new_item = new_item.replace("in_layers.2", "conv1")
  
          new_item = new_item.replace("out_layers.0", "norm2")
          new_item = new_item.replace("out_layers.3", "conv2")
  
          new_item = new_item.replace("emb_layers.1", "time_emb_proj")
          new_item = new_item.replace(
              "skip_connection", "conv_shortcut"
          )
  
          new_item = shave_segments(
              new_item, n_shave_prefix_segments=n_shave_prefix_segments
          )
  
          mapping.append({"old": old_item, "new": new_item})
  
      return mapping
  
imports: import argparse
  import re
  from typing import List, Union
  import torch
  from transformers import AutoFeatureExtractor, AutoTokenizer, ClapConfig, ClapModel, GPT2Config, GPT2Model, SpeechT5HifiGan, SpeechT5HifiGanConfig, T5Config, T5EncoderModel
  from diffusers import AudioLDM2Pipeline, AudioLDM2ProjectionModel, AudioLDM2UNet2DConditionModel, AutoencoderKL, DDIMScheduler, DPMSolverMultistepScheduler, EulerAncestralDiscreteScheduler, EulerDiscreteScheduler, HeunDiscreteScheduler, LMSDiscreteScheduler, PNDMScheduler
  from diffusers.utils import is_omegaconf_available, is_safetensors_available
  from diffusers.utils.import_utils import BACKENDS_MAPPING
label_desc: Use image node_id 2 for calling a global function with example usage: renew_resnet_paths(old_list, n_shave_prefix_segments) and returns: mapping