Tries to connect to the device to see if it is connectable.

    Args:
        host: The host to connect.
        port: The port to connect.

    Returns:
        True or False.

def is_connectable(host: str, port: Union[int, str]) -> bool:
    """Tries to connect to the device to see if it is connectable.

    Args:
        host: The host to connect.
        port: The port to connect.

    Returns:
        True or False.
    """
    socket_ = None
    try:
        socket_ = socket.create_connection((host, port), 1)
        result = True
    except socket.timeout:
        result = False
    finally:
        if socket_:
            socket_.close()
    return result