def _to_node(self, element):
        try:
            state = self.NODE_STATE_MAP[self._findattr(element, 
                                        "instanceState/name")]
        except __HOLE__:
            state = NodeState.UNKNOWN

        n = Node(id=self._findtext(element, 'instanceId'),
                 name=self._findtext(element, 'instanceId'),
                 state=state,
                 public_ip=self._findtext(element, 'dnsName'),
                 private_ip=self._findtext(element, 'privateDnsName'),
                 driver=self.connection.driver)
        return n
dataset/ETHPy150Open infincia/AEServmon/libcloud/drivers/ec2.py/EC2NodeDriver._to_node