code: def default(val, d):
      if exists(val):
          return val
      if isinstance(d, (torch.Tensor, float, int)):
          return d
      return d() if isfunction(d) else d
  
imports: import math
  from inspect import isfunction
  import torch
  import torch.nn.functional
  from apex.contrib.group_norm import GroupNorm
  from einops import rearrange
  from torch import einsum, nn
  from torch._dynamo import disable
  from nemo.collections.multimodal.modules.stable_diffusion.diffusionmodules.util import checkpoint
label_desc: Use image node_id 4 for calling a global function with example usage: default(val, d) and returns: unknown, val, d