message: Fix weakref unwrapping in AutoGraph conversion
diff: @@ -218,6 +218,11 @@ class ConversionOptions(object):
  def as_qualified_name(o):
  name = inspect_utils.getqualifiedname(ctx.info.namespace, o, max_depth=1)
  if not name:
  + if isinstance(o, weakref.ref):
  + # `o` might already be a weak reference, if this object was
  + # constructed from code generated by `to_ast` itself.
  + # If so, unpack it.
  + o = o()
  # TODO(mdan): This needs to account for the symbols defined locally.
  name = ctx.namer.new_symbol(o.__name__, ())
  ctx.program.add_symbol(name, weakref.ref(o))
  