code: def main(readcsv=pd_read_csv):
      data_path = Path(__file__).parent / "data" / "batch"
      infile = data_path / "covcormoments_dense.csv"
  
      # We know the number of lines in the file
      # and use this to separate data between processes
      skiprows, nrows = get_chunk_params(
          lines_count=200,
          chunks_count=d4p.num_procs(),
          chunk_number=d4p.my_procid(),
      )
  
      # Each process reads its chunk of the file
      data = readcsv(infile, skip_header=skiprows, max_rows=nrows)
  
      # Create algorithm with distributed mode
      alg = d4p.covariance(distributed=True)
  
      # Perform computation
      res = alg.compute(data)
  
      # covariance result objects provide correlation, covariance and mean
      assert res.covariance.shape == (data.shape[1], data.shape[1])
      assert res.mean.shape == (1, data.shape[1])
      assert res.correlation.shape == (data.shape[1], data.shape[1])
  
      return res
  
imports: from pathlib import Path
  from readcsv import pd_read_csv
  from spmd_chunks_read import get_chunk_params
  import daal4py
label_desc: Use image node_id 1 for calling a global function with example usage: main(readcsv) and returns: res