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
Resolves an object.

    If this is an array or dictionary, it may still contains
    some indirect objects inside.
    
pdfminer/pdftypes.py