code: def test_soft_copy_param(self):
      a = nn.Linear(1, 5)
      b = nn.Linear(1, 5)
  
      with torch.no_grad():
          a.weight.fill_(0.5)
          b.weight.fill_(1)
  
      # a = (1 - tau) * a + tau * b
      copy_param.soft_copy_param(target_link=a, source_link=b, tau=0.1)
  
      torch_assert_allclose(a.weight, torch.full_like(a.weight, 0.55))
      torch_assert_allclose(b.weight, torch.full_like(b.weight, 1.0))
  
      copy_param.soft_copy_param(target_link=a, source_link=b, tau=0.1)
  
      torch_assert_allclose(a.weight, torch.full_like(a.weight, 0.595))
      torch_assert_allclose(b.weight, torch.full_like(b.weight, 1.0))
  
file_path: pfrl/tests/utils_tests/test_copy_param.py
imports: import unittest
  import numpy
  import torch
  import torch.nn
  from pfrl.testing import torch_assert_allclose
  from pfrl.utils import copy_param
label_desc: Use image node_id 4 for calling the TestCopyParam obj's underlying member method code with example usage: obj.test_soft_copy_param() without return types