Construct a GridFS instance for a MongoDB URI.

def connect_gridfs(uri, db=None):
    """
    Construct a GridFS instance for a MongoDB URI.
    """
    return gridfs.GridFS(
        db or connect_db(uri),
        collection=get_collection(uri) or 'fs',
    )