docs: def deref(obj, guard=None):
      """ dereference $ref
      """
      cur, guard = obj, guard or CycleGuard()
      guard.update(cur)
      while cur and getattr(cur, 'ref_obj', None) != None:
          cur = cur.ref_obj
          guard.update(cur)
      return cur