def _calculate_navigation(offset, length, size):
 if (offset == 0):
  (first, prev) = (((-1), None, _('First Block')), ((-1), None, _('Previous Block')))
 else:
  (first, prev) = ((0, length, _('First Block')), (max(0, (offset - length)), length, _('Previous Block')))
 if ((offset + length) >= size):
  (next, last) = (((-1), None, _('Next Block')), ((-1), None, _('Last Block')))
 else:
  (next, last) = (((offset + length), length, _('Next Block')), (max(0, (size - length)), length, _('Last Block')))
 return (first, prev, next, last)

def _calculate_navigation ( offset , length , size ) : if ( offset == 0 ) : ( first , prev ) = ( ( ( - 1 ) , None , _ ( 'First Block' ) ) , ( ( - 1 ) , None , _ ( 'Previous Block' ) ) ) else : ( first , prev ) = ( ( 0 , length , _ ( 'First Block' ) ) , ( max ( 0 , ( offset - length ) ) , length , _ ( 'Previous Block' ) ) ) if ( ( offset + length ) >= size ) : ( next , last ) = ( ( ( - 1 ) , None , _ ( 'Next Block' ) ) , ( ( - 1 ) , None , _ ( 'Last Block' ) ) ) else : ( next , last ) = ( ( ( offset + length ) , length , _ ( 'Next Block' ) ) , ( max ( 0 , ( size - length ) ) , length , _ ( 'Last Block' ) ) ) return ( first , prev , next , last )
list of tuples for suggested navigation through the file .