code: def __init__(
      self,
      input_files,
      output_name_prefix,
      n_training_shards,
      n_test_shards,
      fraction_test_set,
      segmenting_num_worker,
  ):
      assert (
          len(input_files) > 0
      ), "The input file list must contain at least one file."
      assert (
          n_training_shards > 0
      ), "There must be at least one output shard."
      assert (
          n_test_shards > 0
      ), "There must be at least one output shard."
  
      self.n_training_shards = n_training_shards
      self.n_test_shards = n_test_shards
      self.fraction_test_set = fraction_test_set
      self.segmenting_num_worker = segmenting_num_worker
  
      self.input_files = input_files
  
      self.output_name_prefix = output_name_prefix
      self.output_training_identifier = "_training"
      self.output_test_identifier = "_test"
      self.output_file_extension = ".txt"
  
      self.articles = (
          {}
      )  # key: integer identifier, value: list of articles
      self.sentences = (
          {}
      )  # key: integer identifier, value: list of sentences
      self.output_training_files = (
          {}
      )  # key: filename, value: list of articles to go into file
      self.output_test_files = (
          {}
      )  # key: filename, value: list of articles to go into file
  
      self.init_output_files()
  
file_path: gluon-nlp/scripts/processing/segment_sentences.py
imports: import statistics
  import nltk
  import multiprocessing
  from collections import defaultdict
  from itertools import islice
  import time
  import os
label_desc: Use image node_id 1 to create a new Sharding object  with example: obj = Sharding(input_files, output_name_prefix, n_training_shards, n_test_shards, fraction_test_set, segmenting_num_worker)