def METHOD_NAME(self, key):
    """Normalize the value."""
    if not self.camel:
        return key
    norm_key = []
    last = ''
    for c in key:
        if c.isupper():
            if not last or last == '-':
                norm_key.append(c.lower())
            else:
                norm_key.extend(['-', c.lower()])
        else:
            norm_key.append(c)
        last = c
    return ''.join(norm_key)