#NEWLINE# def _get_recording( self , index ) : #NEWLINE# #INDENT# 'Return the recording that contains a given index.' #NEWLINE# assert ( index >= 0 ) #NEWLINE# recs = np . nonzero ( ( ( recs - self . offsets [ : ( - 1 ) ] ) >= 0 ) ) [ 0 ] #NEWLINE# if ( len ( recs ) == 0 ) : #NEWLINE# #INDENT# return ( len ( self . arrs ) - 1 ) #NEWLINE# #UNINDENT# return recs [ ( - 1 ) ]