def connect_sftp_with_cb(sftp_cb, *args, **kwargs):
    """A "managed" SFTP session. When the SSH session and an additional SFTP 
    session are ready, invoke the sftp_cb callback.
    """

    with _connect_sftp(*args, **kwargs) as (ssh, sftp):
        sftp_cb(ssh, sftp)
A "managed" SFTP session. When the SSH session and an additional SFTP 
    session are ready, invoke the sftp_cb callback.