def __init__(self, host=None, port=None, **kwargs):
        super(NetworkDataSource, self).__init__(**kwargs)
        self.host = host or socket.gethostbyname(socket.gethostname())
        self.port = port or self.DEFAULT_PORT
        self.port = int(self.port)

        try:
            self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            self.socket.connect((self.host, self.port))
        except (OSError, socket.error) as e:
            raise DataSourceError("Unable to open socket connection at  "
                    "%s:%s: %s" % (self.host,self.port, e))
        else:
            LOG.debug("Opened socket connection at %s:%s", self.host, self.port)
New document initializer.
dataset/ETHPy150Open openxc/openxc-python/openxc/sources/network.py/NetworkDataSource.__init__--crossover with--dataset/ETHPy150Open kdart/pycopia/XML/pycopia/XML/POM.py/POMDocument.initialize