code: def test_synchronization(self):
      self.start_tests(name="synchronization")
  
      actions = dict(
          bool_action=dict(type="bool", shape=(1,)),
          int_action1=dict(type="int", shape=(), num_values=4),
          int_action2=dict(type="int", shape=(2,), num_values=3),
          int_action3=dict(type="int", shape=(2, 1), num_values=2),
          gaussian_action1=dict(
              type="float", shape=(1, 2), min_value=1.0, max_value=2.0
          ),
          gaussian_action2=dict(
              type="float", shape=(1,), min_value=-2.0, max_value=1.0
          ),
      )
      # Requires same size, but can still vary RNN horizon
      baseline = dict(
          type="parametrized_distributions",
          network=dict(type="auto", size=8, depth=1, rnn=1),
          distributions=dict(
              int_action2=dict(
                  type="categorical", temperature_mode="predicted"
              ),
              int_action3=dict(
                  type="categorical", temperature_mode="global"
              ),
              gaussian_action2=dict(
                  type="gaussian",
                  stddev_mode="global",
                  bounded_transform="clipping",
              ),
          ),
      )
      # Using policy_gradient here, since action_value is covered by DQN
      baseline_objective = "policy_gradient"
      self.unittest(
          actions=actions,
          baseline=baseline,
          baseline_optimizer=dict(
              type="synchronization", update_weight=1.0
          ),
          baseline_objective=baseline_objective,
      )
  
      self.unittest(
          actions=actions,
          baseline=baseline,
          baseline_optimizer=dict(
              type="synchronization",
              update_weight=1.0,
              sync_frequency=2,
          ),
          baseline_objective=baseline_objective,
      )
  
file_path: tensorforce/test/test_optimizers.py
imports: import unittest
  from test.unittest_base import UnittestBase
label_desc: Use image node_id 5 for calling the TestOptimizers obj's underlying member method code with example usage: obj.test_synchronization() without return types