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

    def __str__(self):
        return text_format.MessageToString(self)
    cls.__str__ = __str__

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

def _AddStrMethod(message_descriptor, cls):