code: def resolve1(x, default=None):
      
      while isinstance(x, PDFObjRef):
          x = x.resolve(default=default)
      return x
docs: Resolves an object.
  
      If this is an array or dictionary, it may still contains
      some indirect objects inside.