def to_string(value):
    """Returns a string for the value that can be handled by the
    balancer manager.

    :param value: Any value.
    """
    if isinstance(value, bool):
        return '1' if value else '0'
    elif value:
        return str(value)
    else:
        return ''
