code: def start_brokers(n):
      print(
          "Starting {0} {1}-node cluster...".format(
              KafkaFixture.kafka_version, n
          )
      )
      print("-> 1 Zookeeper")
      zk = ZookeeperFixture.instance()
      print("---> {0}:{1}".format(zk.host, zk.port))
      print()
  
      partitions = min(n, 3)
      replicas = min(n, 3)
      print(
          "-> {0} Brokers [{1} partitions / {2} replicas]".format(
              n, partitions, replicas
          )
      )
      brokers = [
          KafkaFixture.instance(
              i,
              zk,
              zk_chroot="",
              partitions=partitions,
              replicas=replicas,
          )
          for i in range(n)
      ]
      for broker in brokers:
          print("---> {0}:{1}".format(broker.host, broker.port))
      print()
      return brokers
  
file_path: kafka-python/benchmarks/producer_performance.py
imports: from __future__ import absolute_import, print_function
  import argparse
  import pprint
  import sys
  import threading
  import traceback
  from kafka.vendor.six.moves import range
  from kafka import KafkaProducer
  from test.fixtures import KafkaFixture, ZookeeperFixture
label_desc: Use image node_id 1 for calling a global function with example usage: start_brokers(n) and returns: brokers