def _get_ref(data, view, position, obj_end, opts, element_name):
    """Decode (deprecated) BSON DBPointer to bson.dbref.DBRef."""
    collection, position = _get_string(
        data, view, position, obj_end, opts, element_name)
    oid, position = _get_oid(data, view, position, obj_end, opts, element_name)
    return DBRef(collection, oid), position
Decode (deprecated) BSON DBPointer to bson.dbref.DBRef.
stackoverflow/venv/lib/python3.6/site-packages/bson/__init__.py