import socket


def worker_is_remote(remote_host):
    """
    Check remote_host is not the same as current.
    """
    try:
        socket.inet_aton(remote_host)
    except socket.error:
        remote_ip = socket.gethostbyname(remote_host)
    else:
        remote_ip = remote_host

    local_ip = socket.gethostbyname(socket.gethostname())

    return local_ip != remote_ip