def METHOD_NAME(self, tree):
    host = {
        "ip": tree.find("host_details/ip_address").text,
        "hostname": tree.find("host_details/host_name").text,
        "port": tree.find("scan_progress/port/port_number").text,
        "service_name": "https" if "https" in tree.find("host_details/host_name").text else "http"
    }
    return host