code: def test_regularize_layer_params_weighted(self, layers):
      from lasagne.regularization import (
          regularize_layer_params_weighted,
      )
      from lasagne.regularization import apply_penalty, l2
  
      l_1, l_2, l_3 = layers
  
      layers = OrderedDict()
      layers[l_2] = 0.1
      layers[l_3] = 0.5
  
      loss = regularize_layer_params_weighted(
          layers, lasagne.regularization.l2
      )
      assert equal_computations(
          [loss],
          [
              sum(
                  [
                      0.1 * apply_penalty([l_2.W], l2),
                      0.5 * apply_penalty([l_3.W], l2),
                  ]
              )
          ],
      )
  
file_path: Lasagne/lasagne/tests/test_regularization.py
imports: import pytest
  import numpy
  import theano.tensor
  import lasagne
  from collections import OrderedDict
  from theano.scan_module.scan_utils import equal_computations
  from mock import Mock
label_desc: Use image node_id 6 for calling the TestRegularizationHelpers obj's underlying member method code with example usage: obj.test_regularize_layer_params_weighted(layers) without return types