def test_ctde_ac_network() -> None:
    """
    **Overview**:
        The function of testing CTDE actor-critic network. Construct a network and pass a batch of data to it.
        Then validate the shape of different parts of output.
    """
    # Set batch size, agent number, observation shape and action shape.
    batch_size = 4
    agent_num = 3
    local_obs_shape = 10
    global_obs_shape = 20
    action_shape = 5
    # Test case for the shared global obs.
    network = CTDEActorCriticNetwork(agent_num, local_obs_shape, global_obs_shape, action_shape)
    local_obs = torch.randn(batch_size, agent_num, local_obs_shape)
    global_obs = torch.randn(batch_size, global_obs_shape)
    result = network(local_obs, global_obs)
    assert result['logit'].shape == (batch_size, agent_num, action_shape)
    assert result['value'].shape == (batch_size, 1)

    # Test case for the agent-specific global obs.
    agent_specific_global_obs_shape = 25
    network = CTDEActorCriticNetwork(agent_num, local_obs_shape, agent_specific_global_obs_shape, action_shape)
    local_obs = torch.randn(batch_size, agent_num, local_obs_shape)
    agent_specific_global_obs = torch.randn(batch_size, agent_num, agent_specific_global_obs_shape)
    result = network(local_obs, agent_specific_global_obs)
    assert result['logit'].shape == (batch_size, agent_num, action_shape)
    assert result['value'].shape == (batch_size, agent_num, 1)

    **Overview**:
        The function of testing CTDE actor-critic network. Construct a network and pass a batch of data to it.
        Then validate the shape of different parts of output.
    
chapter6_marl/marl_network.py