code: def runTest(self):
      sampleText = """
              A dog loves going out on a walk, eating and sleeping in front of the fireplace. 
              This how a dog lives. 
              It's great!
          """.strip()
      data_df = SparkContextForTest.spark.createDataFrame(
          [[sampleText]]
      ).toDF("text")
  
      document_assembler = (
          DocumentAssembler()
          .setInputCol("text")
          .setOutputCol("document")
      )
  
      sentence_detector = (
          SentenceDetectorDLModel.pretrained()
          .setInputCols(["document"])
          .setOutputCol("sentences")
          .setMaxLength(35)
          .setMinLength(15)
          .setCustomBounds([","])
      )
  
      pipeline = Pipeline(
          stages=[document_assembler, sentence_detector]
      )
      model = pipeline.fit(data_df)
      results = (
          model.transform(data_df)
          .selectExpr("explode(sentences)")
          .collect()
      )
      print(results)
      self.assertEqual(len(results), 2)
  
      sentence_detector.setUseCustomBoundsOnly(True).setMinLength(
          0
      ).setMaxLength(1000).setCustomBounds([","])
  
      pipeline = Pipeline(
          stages=[document_assembler, sentence_detector]
      )
      model = pipeline.fit(data_df)
      results = (
          model.transform(data_df)
          .selectExpr("explode(sentences)")
          .collect()
      )
      print(results)
      self.assertEqual(len(results), 2)
  
      impossible_penultimates = (
          sentence_detector.getImpossiblePenultimates()
      )
  
      sentence_detector.setUseCustomBoundsOnly(False).setMinLength(
          0
      ).setMaxLength(1000).setCustomBounds(
          []
      ).setImpossiblePenultimates(
          impossible_penultimates + ["fireplace"]
      )
  
      pipeline = Pipeline(
          stages=[document_assembler, sentence_detector]
      )
      model = pipeline.fit(data_df)
      results = (
          model.transform(data_df)
          .selectExpr("explode(sentences)")
          .collect()
      )
      print(results)
      self.assertEqual(len(results), 2)
  
      sentence_detector.setUseCustomBoundsOnly(False).setMinLength(
          0
      ).setMaxLength(1000).setCustomBounds(
          []
      ).setImpossiblePenultimates(
          impossible_penultimates
      )
  
file_path: spark-nlp/python/test/annotator/sentence/sentence_detector_dl_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 1 for calling the SentenceDetectorDLExtraParamsTestSpec obj's underlying member method code with example usage: obj.runTest() without return types