human
I wrote the below code

    b = sc.broadcast(model)
    def project_local(x):
        x = np.concatenate(x)
        coarse = b.value.predict_coarse(x)
        return b.value.project(x, coarse)
    projected = split_vecs.map(project_local)
    split_vecs = projected.map((lambda x: np.split(x, M)))
    split_vecs.cache()
    subquantizers = []
    for split in xrange(M):
        data = split_vecs.map((lambda x: x[split]))
        data.cache()
        sub = KMeans.train(data, subquantizer_clusters, initializationMode='random', maxIterations=10, seed=seed)
        data.unpersist()
        subquantizers.append(np.vstack(sub.clusterCenters))
    return (subquantizers[:(len(subquantizers) / 2)], subquantizers[(len(subquantizers) / 2):])

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def train_subquantizers(sc, split_vecs, M, subquantizer_clusters, model, seed=None):