code: def surf(Z, cmap="rainbow", figsize=None):
      plt.figure(figsize=figsize)
      ax3 = plt.axes(projection="3d")
  
      w, h = Z.shape[:2]
      xx = np.arange(0, w, 1)
      yy = np.arange(0, h, 1)
      X, Y = np.meshgrid(xx, yy)
      ax3.plot_surface(X, Y, Z, cmap=cmap)
      # ax3.contour(X,Y,Z, zdim='z',offset=-2，cmap=cmap)
      plt.show()
  
imports: import os
  import math
  import random
  import numpy
  import torch
  import cv2
  from torchvision.utils import make_grid
  from datetime import datetime
label_desc: Use image node_id 4 for calling a global function with example usage: surf(Z, cmap, figsize) without return types