<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resolve1(x, default=None):
 """Resolves an object. If this is an array or dictionary, it may still contains some indirect objects inside. """

    while isinstance(x, PDFObjRef):
        x = x.resolve(default=default)
    return x