<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _hyphenate(input, add_prefix=False):
 """Change underscores to hyphens so that object attributes can be easily tranlated to GPG option names. :param str input: The attribute to hyphenate. :param bool add_prefix: If True, add leading hyphens to the input. :rtype: str :return: The ``input`` with underscores changed to hyphens. """

    ret  = '--' if add_prefix else ''
    ret += input.replace('_', '-')
    return ret