human
Solve the following python programming problem given the following code:
@ patch.object (SimpleClient, '_get_conn') 
@ patch.object (SimpleClient, 'load_metadata_for_topics') 
def test_send_broker_unaware_request_fail(self, load_metadata, conn) : 
    mocked_conns = { 
        ('kafka01', 9092) : MagicMock (), 
        ('kafka02', 9092) : MagicMock (), 
} 
    for val in mocked_conns.values () : 
        mock_conn (val, success = False) 
def mock_get_conn(host, port, afi) : 
        return mocked_conns [(host, port)] 
conn.side_effect = val 
    client = SimpleClient (hosts = ['kafka01:9092', 'kafka02:9092']) 
    req = KafkaProtocol.encode_metadata_request () 
    with self.assertRaises (KafkaUnavailableError) : 
        client._send_broker_unaware_request (payloads = ['fake request'], encoder_fn = MagicMock (return_value = 'fake encoded message'), decoder_fn = (lambda x : x)) 
for (key, conn) in six.iteritems (mocked_conns) : 
        conn.send.assert_called_with ('fake encoded message') 

    
    

    Fix the buggy line: conn.side_effect = val
assistant
#Here is Python program to fix the buggy line: conn.

conn.side_effect = def mock_get_conn(