code: def create_nonzero_mask(data):
      assert (
          len(data.shape) == 4 or len(data.shape) == 3
      ), "The input data must have shape (C, X, Y, Z) or shape (C, X, Y), but got {}.".format(
          data.shape
      )
      nonzero_mask = np.zeros(data.shape[1:], dtype=bool)
      for c in range(data.shape[0]):
          this_mask = data[c] != 0
          nonzero_mask = nonzero_mask | this_mask
      nonzero_mask = binary_fill_holes(nonzero_mask)
      return nonzero_mask
  
imports: import os
  import json
  import shutil
  import pickle
  import numpy
  import SimpleITK
  from scipy.ndimage import binary_fill_holes
  from multiprocessing import Pool
  from collections import OrderedDict
  from .path_utils import join_paths
label_desc: Use image node_id 3 for calling a global function with example usage: create_nonzero_mask(data) and returns: nonzero_mask