docstr: This will generate features, db and images folder in proper format
  and save them to output folder
  
  Args:
      db_file (str): Path to DB file from which samples will be generated
      image_folder (str): Folder where images are present
      features_folder (str): Folder where raw features are present
      name (str): Type of the dataset set
      num_samples (int): Number of objects to be sampled
      output_folder (str): Path where output files will be stored
docstr_tok: ["This","will","generate","features",",","db","and","images","folder","in","proper","format","and","save","them","to","output","folder","Args",":","db_file","(","str",")",":","Path","to","DB","file","from","which","samples","will","be","generated","image_folder","(","str",")",":","Folder","where","images","are","present","features_folder","(","str",")",":","Folder","where","raw","features","are","present","name","(","str",")",":","Type","of","the","dataset","set","num_samples","(","int",")",":","Number","of","objects","to","be","sampled","output_folder","(","str",")",":","Path","where","output","files","will","be","stored"]
code: def generate_and_save_data(
      self,
      db_file,
      image_folder,
      features_folder,
      name,
      num_samples,
      output_folder,
  ):
      """This will generate features, db and images folder in proper format
      and save them to output folder
  
      Args:
          db_file (str): Path to DB file from which samples will be generated
          image_folder (str): Folder where images are present
          features_folder (str): Folder where raw features are present
          name (str): Type of the dataset set
          num_samples (int): Number of objects to be sampled
          output_folder (str): Path where output files will be stored
      """
      data, _ = self._load_db_file(db_file, num_samples)
      assert len(data) == num_samples and num_samples > 0
      image_paths = self._get_image_paths(data, image_folder)
      feature_paths = self._get_feature_paths(data, features_folder)
  
      image_output_folder = os.path.join(output_folder, "images/")
      os.makedirs(image_output_folder, exist_ok=True)
  
      for path in image_paths:
          shutil.copy(path, image_output_folder)
  
      features_output_folder = os.path.join(
          output_folder, "features", "raw/"
      )
      os.makedirs(features_output_folder, exist_ok=True)
  
      for path in feature_paths:
          shutil.copy(path, features_output_folder)
  
      db_output_folder = os.path.join(output_folder, "db/")
      os.makedirs(db_output_folder, exist_ok=True)
  
      output = []
      for d in data:
          output.append(json.dumps(d))
      output = "\n".join(output)
  
      with open(
          os.path.join(db_output_folder, f"{name}.jsonl"), "w"
      ) as f:
          f.write(output)
  
      lmdb_folder = os.path.join(output_folder, "features")
      LMDBConversion.get_parser = mock_lmdb_parser(
          features_output_folder, lmdb_folder
      )
      lmdb_converter = LMDBConversion()
      lmdb_converter.execute()
  
file_path: mmf/tools/scripts/tests/generate_test_data.py
imports: import argparse
  import json
  import os
  import shutil
  import numpy
  from tools.scripts.features.lmdb_conversion import LMDBConversion
label_desc: Use image node_id 4 for calling the TestDataBuilder obj's underlying member method code with example usage: obj.generate_and_save_data(db_file, image_folder, features_folder, name, num_samples, output_folder) without return types