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

    fname = os.path.basename(source)
    def test_shape(self):
        trees = PhyloXMLIO.parse(source)
        for (tree, shape_expect) in zip(trees, shapes):
            self.assertEqual(len(tree.clade), len(shape_expect))
            for (clade, sub_expect) in zip(tree.clade, shape_expect):
                self.assertEqual(len(clade), sub_expect[0])
                for (subclade, len_expect) in zip(clade, sub_expect[1]):
                    self.assertEqual(len(subclade), len_expect)
    test_shape.__doc__ = ('Check    the    branching    structure    of    %s.' % fname)
    return test_shape

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

def _test_shape_factory(source, shapes):