Implement isinstance and issubclass for resources.
Update for flake8 compliance.