code: def default(val, d):
      if val is not None:
          return val
      return d() if isfunction(d) else d
  
imports: from functools import partial
  from inspect import isfunction
  import numpy
  import torch
  from torch import nn, einsum
  import torch.nn.functional
label_desc: Use image node_id 1 for calling a global function with example usage: default(val, d) and returns: unknown, val