def _validate_project(project, parent):
 if (parent is None):
  if (project is None):
   raise ValueError('A Key must have a project set.')
 return project

def _validate_project ( project , parent ) : if ( parent is None ) : if ( project is None ) : raise ValueError ( 'A Key must have a project set.' ) return project
ensure the project is set appropriately .