code: def testWeightDecay(self):
      batch_size = 3
      num_obs_dims = 5
      obs_spec = tensor_spec.TensorSpec([num_obs_dims], tf.float32)
      network = encoding_network.EncodingNetwork(
          obs_spec, fc_layer_params=[20], weight_decay_params=[0.5]
      )
      obs = tf.random.uniform([batch_size, num_obs_dims])
      network(obs)
      self.evaluate(tf.compat.v1.global_variables_initializer())
      regularization_loss = self.evaluate(network.losses[0])
      self.assertGreater(regularization_loss, 0)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tf_agents.networks import encoding_network
  from tf_agents.specs import tensor_spec
  from tf_agents.utils import test_utils
label_desc: Use image node_id 17 for calling the EncodingNetworkTest obj's underlying member method code with example usage: obj.testWeightDecay() without return types