def get_client(ip_port):
ip_port = normalize_ip_port(ip_port)
pid = os.getpid()
with _lock:
o = _pid_client[ip_port]
if pid not in o:
o[pid] = redis.StrictRedis(*ip_port)
return _pid_client[ip_port][pid]