def validate_required(value, required):
 if (required and (not value)):
  raise ValueError(u'must be set.')

def validate_required ( value , required ) : if ( required and ( not value ) ) : raise ValueError ( u'must be set.' )
validate that value is set if required normally called in :meth:~mopidy .