code: def save_vw_reg_dataset(self, X, Y, ds_dir):
      self.n, self.d = np.shape(X)
      with gzip.open(os.path.join(ds_dir, self.fname), "w") as f:
          for i in range(self.n):
              st = "{} | {}\n".format(
                  Y[i],
                  " ".join(
                      "{}:{:.6f}".format(j, val)
                      for j, val in zip(range(1, self.d + 1), X[i].data)
                  ),
              )
              f.write(st.encode())
  
file_path: vowpal_wabbit/demo/cats/utility/create_synthetic_data.py
imports: import numpy
  import math
  import gzip
  import os
  import pandas
  import math
  import sys
  import getopt
label_desc: Use image node_id 3 for calling the SyntheticData obj's underlying member method code with example usage: obj.save_vw_reg_dataset(X, Y, ds_dir) without return types