code: def create_local_socket (self):
          
          sock = create_socket(socket.AF_UNIX, socket.SOCK_STREAM)
          addr = self['LocalSocket']
          try:
              sock.connect(addr)
          except socket.error:
              sock.close()
              raise
          return sock
docs: Create local socket, connect to it and return socket object.