code: def __init__(
      self,
      html_dataset,
      dom_tree_simplificator,
      pre_extraction_simplificator,
      path_save_dir_dataset,
      num_proc,
      path_save_file_image_urls,
      path_save_dir_downloaded_images,
      thread_count,
      number_sample_per_shard,
      image_size,
      resize_mode,
      path_save_dir_tmp_datasets_images,
      path_save_dir_dataset_images,
      path_save_file_map_url_idx,
      num_proc_urls_to_images,
      path_save_dir_sharded_dataset,
      shard_size,
  ):
      self.dataset = html_dataset
  
      self.dom_tree_simplificator = dom_tree_simplificator
      self.pre_extraction_simplificator = pre_extraction_simplificator
  
      self.path_save_dir_dataset = path_save_dir_dataset
      self.num_proc = num_proc
      self.path_save_file_image_urls = path_save_file_image_urls
      self.path_save_dir_downloaded_images = (
          path_save_dir_downloaded_images
      )
      self.thread_count = thread_count
      self.number_sample_per_shard = number_sample_per_shard
      self.image_size = image_size
      self.resize_mode = resize_mode
      self.path_save_dir_tmp_datasets_images = (
          path_save_dir_tmp_datasets_images
      )
      self.path_save_dir_dataset_images = path_save_dir_dataset_images
      self.path_save_file_map_url_idx = path_save_file_map_url_idx
      self.num_proc_urls_to_images = num_proc_urls_to_images
      self.path_save_dir_sharded_dataset = path_save_dir_sharded_dataset
      self.shard_size = shard_size
  
imports: import glob
  import json
  import logging
  import math
  import os
  import tarfile
  from copy import deepcopy
  import git
  from datasets import Dataset, Image, Sequence, Value, concatenate_datasets, load_from_disk
  from pathos.multiprocessing import ProcessingPool
  from tqdm import tqdm
label_desc: Use image node_id 1 to create a new CommonCrawlWebDocumentExtractor object  with example: obj = CommonCrawlWebDocumentExtractor(html_dataset, dom_tree_simplificator, pre_extraction_simplificator, path_save_dir_dataset, num_proc, path_save_file_image_urls, path_save_dir_downloaded_images, thread_count, number_sample_per_shard, image_size, resize_mode, path_save_dir_tmp_datasets_images, path_save_dir_dataset_images, path_save_file_map_url_idx, num_proc_urls_to_images, path_save_dir_sharded_dataset, shard_size)