def METHOD_NAME(author, name):
	user = User.query.filter_by(username=author).first()
	if user is None:
		return None
	package = Package.query.filter_by(name=name, author_id=user.id) \
		.filter(Package.state!=PackageState.DELETED).first()
	if package is None:
		return None
	return package