human
Here's a good function header given the following:
I wrote the below code

    def run_bgd(mode):
        disturb_mem.disturb_mem()
        rng = np.random.RandomState([2012, 11, 27, 8])
        batch_size = 5
        train_batches = 3
        valid_batches = 4
        num_features = 2
        w = rng.randn(num_features)
        def make_dataset(num_batches):
            disturb_mem.disturb_mem()
            m = (num_batches * batch_size)
            X = rng.randn(m, num_features)
            y = np.zeros((m, 1))
            y[:, 0] = (np.dot(X, w) > 0.0)
            rval = DenseDesignMatrix(X=X, y=y)
            rval.yaml_src = ''
            X = rval.get_batch_design(batch_size)
            assert (X.shape == (batch_size, num_features))
            return rval
        train = make_dataset(train_batches)
        valid = make_dataset(valid_batches)
        num_chunks = 10
        chunk_width = 2
        class ManyParamsModel(Model, ):
            '\n                                                Make    a    model    with    lots    of    parameters,    so    that    there    are    many\n                                                opportunities    for    their    updates    to    get    accidentally    re-ordered\n                                                non-deterministically.    This    makes    non-determinism    bugs    manifest\n                                                more    frequently.\n                                                '
            def __init__(self):
                super(ManyParamsModel, self).__init__()
                self.W1 = [sharedX(rng.randn(num_features, chunk_width)) for i in xrange(num_chunks)]
                disturb_mem.disturb_mem()
                self.W2 = [sharedX(rng.randn(chunk_width)) for i in xrange(num_chunks)]
                self._params = safe_union(self.W1, self.W2)
                self.input_space = VectorSpace(num_features)
                self.output_space = VectorSpace(1)
        disturb_mem.disturb_mem()
        model = ManyParamsModel()
        disturb_mem.disturb_mem()
        class LotsOfSummingCost(Cost,...

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

def test_determinism():