def _to_node(self, data, ex_cloud_service_name=None, virtual_ips=None):
        """
        Convert the data from a Azure response object into a Node
        """

        remote_desktop_port = ''
        ssh_port = ''
        public_ips = virtual_ips or []

        if data.instance_endpoints is not None:
            if len(data.instance_endpoints) >= 1:
                public_ips = [data.instance_endpoints[0].vip]

            for port in data.instance_endpoints:
                if port.name == 'Remote Desktop':
                    remote_desktop_port = port.public_port

                if port.name == "SSH":
                    ssh_port = port.public_port

        return Node(
            id=data.role_name,
            name=data.role_name,
            state=self.NODE_STATE_MAP.get(
                data.instance_status,
                NodeState.UNKNOWN
            ),
            public_ips=public_ips,
            private_ips=[data.ip_address],
            driver=self.connection.driver,
            extra={
                'instance_endpoints': data.instance_endpoints,
                'remote_desktop_port': remote_desktop_port,
                'ssh_port': ssh_port,
                'power_state': data.power_state,
                'instance_size': data.instance_size,
                'ex_cloud_service_name': ex_cloud_service_name
            }
        )
dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/azure.py/AzureNodeDriver._to_node/original