@staticmethod
def copy_with_comments(source_dict, source_key, dest_dict, dest_key,
    delete_source=False, logger=None):
    """Copy dict with comments in config."""
    dest_dict[dest_key] = source_dict[source_key]
    try:
        dest_dict.ca.items[dest_key] = source_dict.ca.items[source_key]
        if logger and not delete_source:
            logger.debug('Copying key: %s -> %s', source_key, dest_key)
    except (KeyError, AttributeError):
        pass
    if delete_source:
        if logger:
            logger.debug('Moving key: %s -> %s', source_key, dest_key)
        del source_dict[source_key]
        source_dict.ca.items.pop(source_key, None)
