code: def test_networks_independent(ray_start_2_cpus):
      # Note we use only one worker to ensure that all of the remote
      # functions run on the same worker.
      net1 = NetActor()
      net2 = NetActor()
  
      # Make sure the two networks have different weights. TODO(rkn): Note
      # that equality comparisons of numpy arrays normally does not work.
      # This only works because at the moment they have size 1.
      weights1 = net1.get_weights()
      weights2 = net2.get_weights()
      assert weights1 != weights2
  
      # Set the weights and get the weights, and make sure they are
      # unchanged.
      new_weights1 = net1.set_and_get_weights(weights1)
      new_weights2 = net2.set_and_get_weights(weights2)
      assert weights1 == new_weights1
      assert weights2 == new_weights2
  
      # Swap the weights.
      new_weights1 = net2.set_and_get_weights(weights1)
      new_weights2 = net1.set_and_get_weights(weights2)
      assert weights1 == new_weights1
      assert weights2 == new_weights2
  
imports: from numpy.testing import assert_almost_equal
  import ray
  import ray.experimental.tf_utils
  from ray.rllib.utils.framework import try_import_tf
label_desc: Use image node_id 6 for calling a global function with example usage: test_networks_independent(ray_start_2_cpus) without return types