#NEWLINE# def _find_snapshot_id_in_bdm( self , image , device_name ) : #NEWLINE# #INDENT# return next ( ( bdm [ 'ebs' ] [ 'snapshotId' ] for bdm in image [ 'blockDeviceMapping' ] if ( bdm [ 'deviceName' ] == device_name ) ) )