code: def viz_digits(features, feature_names, max_depth):
      digits = load_digits()
  
      # "8x8 image of integer pixels in the range 0..16."
      columns = [f"pixel[{i},{j}]" for i in range(8) for j in range(8)]
  
      fig, ax = plt.subplots(1, 1)
      X_train = digits.data[:, features]
      y_train = digits.target
      if len(features) == 1:
          x_train = digits.data[:, features[0]]
  
          ctreeviz_univar(
              ax,
              x_train,
              y_train,
              max_depth=max_depth,
              feature_name=feature_names[0],
              class_names=[str(i) for i in range(10)],
              gtype="strip",
              target_name="digit",
          )
          filename = f"/tmp/digits-{feature_names[0]}-featspace-depth-{max_depth}.svg"
      else:
          ctreeviz_bivar(
              ax,
              X_train,
              y_train,
              max_depth=max_depth,
              feature_names=feature_names,
              class_names=[str(i) for i in range(10)],
              target_name="digit",
          )
          filename = f"/tmp/digits-{','.join(feature_names)}-featspace-depth-{max_depth}.svg"
  
      print(f"Create {filename}")
      plt.tight_layout()
      plt.savefig(filename, bbox_inches=0, pad_inches=0)
      plt.show()
  
imports: import numpy
  import pandas
  import graphviz
  import graphviz.backend
  from numpy.distutils.system_info import f2py_info
  from sklearn import tree
  from sklearn.datasets import load_boston, load_iris, load_wine, load_digits, load_breast_cancer, load_diabetes, fetch_mldata
  from matplotlib.figure import figaspect
  import string
  import re
  import matplotlib.pyplot
  import seaborn
  from dtreeviz.shadow import *
  from numbers import Number
  import matplotlib.patches
  from scipy import stats
  from sklearn.neighbors import KernelDensity
  import inspect, sys, tempfile
  from dtreeviz.trees import *
label_desc: Use image node_id 1 for calling a global function with example usage: viz_digits(features, feature_names, max_depth) without return types