code: def test_z_score_outlier_detector_corner_cases():
      """Tests `TukeyOutlierDetector` usage with corner cases."""
      detect_outlier = ZScoreOutlierDetector()
      # The case where data is perfectly linear.
      y = np.arange(100)
  
      detect_outlier.fit(y)
      fitted = detect_outlier.fitted
  
      assert abs(detect_outlier.fitted_param["trimmed_mean"] - 0) < 0.5
      assert abs(detect_outlier.fitted_param["trimmed_sd"] - 0) < 0.5
      assert sum(fitted.is_outlier) == 0
  
      fig = helper_plot_outliers(
          y=y,
          detection_result=fitted,
          title="ZScore: perfectly linear data",
      )
      if FIG_SHOW:
          fig.show()
      assert fig is not None
  
      detect_outlier = ZScoreOutlierDetector()
      # The case where data is constant.
      y = np.zeros(100)
  
      detect_outlier.fit(y)
      fitted = detect_outlier.fitted
  
      assert abs(detect_outlier.fitted_param["trimmed_mean"] - 0) < 0.5
      assert abs(detect_outlier.fitted_param["trimmed_sd"] - 0) < 0.5
      assert sum(fitted.is_outlier) == 0
  
      fig = helper_plot_outliers(
          y=y, detection_result=fitted, title="ZScore: constant"
      )
      if FIG_SHOW:
          fig.show()
      assert fig is not None
  
imports: import numpy
  import pandas
  import pytest
  from greykite.common.features.outlier import EXPONENTIAL_SMOOTHING
  from greykite.common.features.outlier import MOVING_MEDIAN
  from greykite.common.features.outlier import BaseOutlierDetector
  from greykite.common.features.outlier import DetectionResult
  from greykite.common.features.outlier import DiffMethod
  from greykite.common.features.outlier import TukeyOutlierDetector
  from greykite.common.features.outlier import ZScoreOutlierDetector
  from greykite.common.viz.timeseries_annotate import plot_lines_markers
label_desc: Use image node_id 15 for calling a global function with example usage: test_z_score_outlier_detector_corner_cases() without return types