code: def test_nnodes(spark_dtree):
      assert (
          spark_dtree.nnodes() == 17
      ), "Number of nodes from tree should be 17"
  
imports: import numpy
  import pyspark
  import pytest
  from pyspark.ml.classification import DecisionTreeClassificationModel
  from pyspark.sql import SparkSession
  from dtreeviz.models.spark_decision_tree import ShadowSparkTree
label_desc: Use image node_id 13 for calling a global function with example usage: test_nnodes(spark_dtree) without return types