

def _to_node(self, element):
    try:
        state = n.NODE_STATE_MAP[self._findattr(element, 'instanceState/name')]
    except KeyError:
        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/VarMisuse@18/22 `self`->`n`