def _validate_requirements(requirements):
 invalid_requirements = []
 for requirement in requirements:
  invalid_params = []
  if (not requirement.get('namespace')):
   invalid_params.append('namespace')
  if (not requirement.get('name')):
   invalid_params.append('name')
  if (not requirement.get('display_name')):
   invalid_params.append('display_name')
  if ('criteria' not in requirement):
   invalid_params.append('criteria')
  if invalid_params:
   invalid_requirements.append(u'{requirement} has missing/invalid parameters: {params}'.format(requirement=requirement, params=invalid_params))
 return invalid_requirements

def _validate_requirements ( requirements ) : invalid_requirements = [ ] for requirement in requirements : invalid_params = [ ] if ( not requirement . get ( 'namespace' ) ) : invalid_params . append ( 'namespace' ) if ( not requirement . get ( 'name' ) ) : invalid_params . append ( 'name' ) if ( not requirement . get ( 'display_name' ) ) : invalid_params . append ( 'display_name' ) if ( 'criteria' not in requirement ) : invalid_params . append ( 'criteria' ) if invalid_params : invalid_requirements . append ( u'{requirement} has missing/invalid parameters: {params}' . format ( requirement = requirement , params = invalid_params ) ) return invalid_requirements
validate the requirements .