human
I wrote the below code

    def replace(match):
        m = match.string[match.start():match.end()]
        if (attr and (m == "'")):
            return m
        return _xml_escape_map[m]
    return _xml_escape_re.sub(replace, value)

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

def _XmlEscape(value, attr=False):