def stringify(package, ref=None):
    """Write the appropriate string for a build or tag of a package.
    This function should be used when writing back a package to the user"""
    return '{}'.format(package) if ref is None else '{}?{}'.format(package, ref
        )
