code: def main(method="defaultDense"):
      data_path = Path(__file__).parent / "data" / "batch"
      infile = data_path / "sorting.csv"
  
      # configure a sorting object
      algo = d4p.sorting()
  
      # let's provide a file directly, not a table/array
      result1 = algo.compute(str(infile))
  
      # We can also load the data ourselfs and provide the numpy array
      data = pd_read_csv(infile)
      result2 = algo.compute(data)
  
      # sorting result objects provide sortedData
      assert np.allclose(result1.sortedData, result2.sortedData)
      assert np.allclose(
          result1.sortedData,
          np.sort(
              data.toarray() if hasattr(data, "toarray") else data,
              axis=0,
          ),
      )
  
      return result1
  
imports: from pathlib import Path
  import numpy
  from readcsv import pd_read_csv
  import daal4py
label_desc: Use image node_id 1 for calling a global function with example usage: main(method) and returns: result1