def maybe_promise(value):
 if isinstance(value, promise):
  return value.evaluate()
 return value

def maybe_promise ( value ) : if isinstance ( value , promise ) : return value . evaluate ( ) return value
evaluates if the value is a promise .