code: def start_cluster(
      tmp_path, num_peers, port_seed=None, extra_env=None
  ):
      assert_project_root()
      peer_dirs = make_peer_folders(tmp_path, num_peers)
  
      # Gathers REST API uris
      peer_api_uris = []
  
      # Start bootstrap
      (bootstrap_api_uri, bootstrap_uri) = start_first_peer(
          peer_dirs[0],
          "peer_0_0.log",
          port=port_seed,
          extra_env=extra_env,
      )
      peer_api_uris.append(bootstrap_api_uri)
  
      # Wait for leader
      leader = wait_peer_added(bootstrap_api_uri)
  
      port = None
      # Start other peers
      for i in range(1, len(peer_dirs)):
          if port_seed is not None:
              port = port_seed + i * 100
          peer_api_uris.append(
              start_peer(
                  peer_dirs[i],
                  f"peer_0_{i}.log",
                  bootstrap_uri,
                  port=port,
                  extra_env=extra_env,
              )
          )
  
      # Wait for cluster
      wait_for_uniform_cluster_status(peer_api_uris, leader)
  
      return peer_api_uris, peer_dirs, bootstrap_uri
  
imports: import json
  import os
  import shutil
  from subprocess import Popen
  import time
  from typing import Tuple, Callable, Dict, List, Optional
  import requests
  import socket
  from contextlib import closing
  from pathlib import Path
  import pytest
  from .assertions import assert_http_ok
label_desc: Use image node_id 11 for calling a global function with example usage: start_cluster(tmp_path, num_peers, port_seed, extra_env) and returns: peer_api_uris,  peer_dirs,  bootstrap_uri