Mongo.GridFs.Bucket.add_session

You're seeing just the function add_session, go back to Mongo.GridFs.Bucket module for more information.
Link to this function

add_session(bucket, session_opts)

View Source

In case of using transaction you need to add the session to the bucket. This functions adds the session pid to the bucket.