code: def test_collect_hosts__happy_path():
      hosts = "127.0.0.1:1234,127.0.0.1"
      results = collect_hosts(hosts)
      assert set(results) == set(
          [
              ("127.0.0.1", 1234, socket.AF_INET),
              ("127.0.0.1", 9092, socket.AF_INET),
          ]
      )
  
imports: from __future__ import absolute_import
  from errno import EALREADY, EINPROGRESS, EISCONN, ECONNRESET
  import socket
  import mock
  import pytest
  from kafka.conn import BrokerConnection, ConnectionStates, collect_hosts
  from kafka.protocol.api import RequestHeader
  from kafka.protocol.metadata import MetadataRequest
  from kafka.protocol.produce import ProduceRequest
  import kafka.errors
label_desc: Use image node_id 20 for calling a global function with example usage: test_collect_hosts__happy_path() without return types