code: def round_nearest(x, a):
      return round(round(x / a) * a, -int(math.floor(math.log10(a))))
  
imports: from decimal import Decimal
  import math
  from numpy import isnan
label_desc: Use image node_id 1 for calling a global function with example usage: round_nearest(x, a) and returns: round