def METHOD_NAME(self, line, ns):
    qty_prec = self.env["decimal.precision"].precision_get("Product UoS")
    line_item = line.xpath("cac:LineItem", namespaces=ns)[0]
    qty_xpath = line_item.xpath("cbc:Quantity", namespaces=ns)
    qty = float(qty_xpath[0].text)
    price_unit = 0.0
    subtotal_without_tax_xpath = line_item.xpath(
        "cbc:LineExtensionAmount", namespaces=ns
    )
    if subtotal_without_tax_xpath:
        subtotal_without_tax = float(subtotal_without_tax_xpath[0].text)
        if not float_is_zero(qty, precision_digits=qty_prec):
            price_unit = subtotal_without_tax / qty
    else:
        price_xpath = line_item.xpath("cac:Price/cbc:PriceAmount", namespaces=ns)
        if price_xpath:
            price_unit = float(price_xpath[0].text)
    line_ref = line_item.xpath("cbc:ID", namespaces=ns)[0]
    res_line = {
        "product": self.ubl_parse_product(line_item, ns),
        "qty": qty,
        "uom": {"unece_code": qty_xpath[0].attrib.get("unitCode")},
        "price_unit": price_unit,
        "order_line_ref": line_ref.text,
    }
    note = self.parse_ubl_sale_order_line_note(line, ns)
    if note:
        res_line["note"] = note
    return res_line