code: def convert_resblock(keras_block, objax_block):
      """Converts variables of residual block from Keras to Objax.
  
      Name mapping between blocks:
          proj_conv   : 0_conv (when exists)
          conv_0      : 1_conv
          conv_1      : 2_conv
          conv_2      : 3_conv
          norm_0      : preact_bn
          norm_1      : 1_bn
          norm_2      : 2_bn
      """
  
      def _find_layer(suffix):
          """Finds a layer whose name contains a suffix."""
          return next(
              layer
              for layer in keras_block
              if layer.name.endswith(suffix)
          )
  
      if hasattr(objax_block, "proj_conv"):
          convert_conv_or_linear_layer(
              _find_layer("0_conv"), objax_block.proj_conv
          )
      convert_conv_or_linear_layer(
          _find_layer("1_conv"), objax_block.conv_0
      )
      convert_conv_or_linear_layer(
          _find_layer("2_conv"), objax_block.conv_1
      )
      convert_conv_or_linear_layer(
          _find_layer("3_conv"), objax_block.conv_2
      )
      convert_bn_layer(_find_layer("preact_bn"), objax_block.norm_0)
      convert_bn_layer(_find_layer("1_bn"), objax_block.norm_1)
      convert_bn_layer(_find_layer("2_bn"), objax_block.norm_2)
  
imports: import functools
  from typing import Callable, Sequence, Union, Optional
  from jax import numpy
  import objax
  from objax.constants import ConvPadding
  from objax.nn import Conv2D
  from objax.typing import JaxArray, ConvPaddingInt
label_desc: Use image node_id 4 for calling a global function with example usage: convert_resblock(keras_block, objax_block) and returns: next