code: def test_kernel_reg(case):
      x, y, model_fn, backbone = case
  
      l1_reg = keras.regularizers.l1(0.1)
      model = model_fn(backbone)
      reg_model = set_regularization(model, kernel_regularizer=l1_reg)
      _test_regularizer(model, reg_model, x, y)
  
      l2_reg = keras.regularizers.l2(0.1)
      model = model_fn(backbone, encoder_weights=None)
      reg_model = set_regularization(model, kernel_regularizer=l2_reg)
      _test_regularizer(model, reg_model, x, y)
  
file_path: segmentation_models/tests/test_utils.py
imports: import pytest
  import numpy
  import segmentation_models
  from segmentation_models.utils import set_regularization
  from segmentation_models import Unet
label_desc: Use image node_id 2 for calling a global function with example usage: test_kernel_reg(case) without return types