code: def q09(lineitem, orders, part, nation, partsupp, supplier):
      psel = part.P_NAME.str.contains("ghost")
      fpart = part[psel]
      jn1 = lineitem.merge(
          fpart, left_on="L_PARTKEY", right_on="P_PARTKEY"
      )
      jn2 = jn1.merge(
          supplier, left_on="L_SUPPKEY", right_on="S_SUPPKEY"
      )
      jn3 = jn2.merge(
          nation, left_on="S_NATIONKEY", right_on="N_NATIONKEY"
      )
      jn4 = partsupp.merge(
          jn3,
          left_on=["PS_PARTKEY", "PS_SUPPKEY"],
          right_on=["L_PARTKEY", "L_SUPPKEY"],
      )
      jn5 = jn4.merge(
          orders, left_on="L_ORDERKEY", right_on="O_ORDERKEY"
      )
      jn5["TMP"] = jn5.L_EXTENDEDPRICE * (1 - jn5.L_DISCOUNT) - (
          (1 * jn5.PS_SUPPLYCOST) * jn5.L_QUANTITY
      )
      jn5["O_YEAR"] = jn5.O_ORDERDATE.dt.year
      gb = jn5.groupby(
          ["N_NAME", "O_YEAR"], as_index=False, sort=False
      )["TMP"].sum()
      total = gb.sort_values(
          ["N_NAME", "O_YEAR"], ascending=[True, False]
      )
      print(total.execute())
  
imports: import argparse
  import functools
  import time
  from typing import Callable, List, Optional, Set, Union
  import mars
  import mars.dataframe
label_desc: Use image node_id 18 for calling a global function with example usage: q09(lineitem, orders, part, nation, partsupp, supplier) without return types