code: def runTest(self):
      document_assembler = (
          DocumentAssembler()
          .setInputCol("text")
          .setOutputCol("document")
      )
      word_segmenter = (
          WordSegmenterApproach()
          .setInputCols("document")
          .setOutputCol("token")
          .setPosColumn("tags")
          .setNIterations(1)
          .fit(self.train)
      )
      pipeline = Pipeline(stages=[document_assembler, word_segmenter])
  
      model = pipeline.fit(self.train)
      model.transform(self.data).show(truncate=False)
  
file_path: spark-nlp/python/test/annotator/ws/word_segmenter_test.py
imports: import os
  import unittest
  import pytest
  from sparknlp.annotator import *
  from sparknlp.base import *
  from test.util import SparkContextForTest
label_desc: Use image node_id 2 for calling the WordSegmenterTestSpec obj's underlying member method code with example usage: obj.runTest() without return types