This is frowned upon in ckan

a) we avoid from `ckan... import ...` as it leads to circular imports of which we have too many but are slowly improving
b) imports should be in the head of the file (unless circular import hell prevents this)

additionally logic functions get model from the context
also `package_revision_table` should be in `ckan.model` which has crazy imports due to pylons

this sort of thing should work (model is already in the function on ln 70)
```
model = context['model']
package_revision_table  = model.package_revision_table
```