Function to check if a address is good
    Args:
        ip_addr: IP address in the following format 192.168.1.1
        return_tuple: Set to True it returns a IP, set to False returns True or False

    Returns: see return_tuple for return options

def ip(ip_addr, return_tuple=True):
    """
    Function to check if a address is good
    Args:
        ip_addr: IP address in the following format 192.168.1.1
        return_tuple: Set to True it returns a IP, set to False returns True or False

    Returns: see return_tuple for return options

    """
    regex_ip = __re.compile("^((25[0-5])|(2[0-4][0-9])|(1[0-9][0-9])|([1-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|(1[0-9][0-9])|([1-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|(1[0-9][0-9])|([1-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|(1[0-9][0-9])|([1-9]?[0-9]))$")
    if return_tuple:
        while not regex_ip.match(ip_addr):
            print("Not a good IP.")
            print("Please try again.")
            ip_addr = input("Please enter a IP address in the following format x.x.x.x: ")
        return ip_addr
    elif not return_tuple:
        if not regex_ip.match(ip_addr):
            return False
        else:
            return True