def _validate_resource_type(resource_db):
 resource_type = resource_db.get_resource_type()
 valid_resource_types = ResourceType.get_valid_values()
 if (resource_type not in valid_resource_types):
  raise ValueError(('Permissions cannot be manipulated for a resource of type: %s' % resource_type))
 return resource_db

def _validate_resource_type ( resource_db ) : resource_type = resource_db . get_resource_type ( ) valid_resource_types = ResourceType . get_valid_values ( ) if ( resource_type not in valid_resource_types ) : raise ValueError ( ( 'Permissions cannot be manipulated for a resource of type: %s' % resource_type ) ) return resource_db
validate that the permissions can be manipulated for the provided resource type .