def METHOD_NAME(match):
    """If key is not found in kwargs, set None instead"""
    key = match.group(1)
    if key not in instance.data:
        self.log.warning(
            "Key '{}' was not found in instance.data "
            "and will be rendered as an empty string "
            "in the comment".format(key)
        )
        return ""
    else:
        return str(instance.data[key])