code: def segment_articles_into_sentences(self):
      print("Start: Sentence Segmentation")
      segmenter = NLTKSegmenter()
      if len(self.articles) is 0:
          self.load_articles()
  
      assert (
          len(self.articles) is not 0
      ), "Please check that input files are present and contain data."
  
      def chunks(data, names, size=len(self.articles), name_size=1):
          it = iter(data)
          it_name = iter(names)
          for i in range(0, len(data), size):
              yield (
                  {k: data[k] for k in islice(it, size)},
                  [p for p in islice(it_name, name_size)],
              )
  
      n_processes = (
          self.segmenting_num_worker
      )  # in addition to the main process, total = n_proc+1
      pool = multiprocessing.Pool(n_processes)
      rank = 0
      args = []
      for item, name_item in chunks(
          self.articles,
          self.output_training_files,
          (len(self.articles) - 1) // (n_processes) + 1,
          (len(self.output_training_files) - 1) // (n_processes) + 1,
      ):
          args.append((item, name_item, rank, segmenter))
          rank += 1
      pool.map(segment_sentences, args)
  
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 3 for calling the Sharding obj's underlying member method code with example usage: obj.segment_articles_into_sentences() without return types