Seems like an odd thing to couple with the doc string. Someone could change the doc string to more fully document the function, and then you'd have this assertion telling out a bunch of unrelated things! Is this a pattern you got from somewhere—if so I'd be curious to hear the rationale.