@staticmethod
def _negotiate_integer_value(client_value, server_value):
    """Negotiates two values. If either of them is 0 or None,
        returns the other one. If both are positive integers, returns the
        smallest one.

        :param int client_value: The client value
        :param int server_value: The server value
        :rtype: int

        """
    if client_value is None:
        client_value = 0
    if server_value is None:
        server_value = 0
    if client_value == 0 or server_value == 0:
        val = max(client_value, server_value)
    else:
        val = min(client_value, server_value)
    return val
