def info(doc: Doc):
    """Return doc Info dictionary if present."""
    trail = trailer(doc)
    info = trail.get('/Info')
    if info:
        return get_object(doc, info)
Return doc Info dictionary if present.
pdfsyntax/docstruct.py