def validate_maximum(value, maximum):
 if ((maximum is not None) and (value > maximum)):
  raise ValueError((u'%r must be smaller than %r.' % (value, maximum)))

def validate_maximum ( value , maximum ) : if ( ( maximum is not None ) and ( value > maximum ) ) : raise ValueError ( ( u'%r must be smaller than %r.' % ( value , maximum ) ) )
validate that value is at most maximum normally called in :meth:~mopidy .