@staticmethod
def _get_ctx(app):
    """
        Gets the dyanmo app context state.
        """
    try:
        return app.extensions['dynamo']
    except KeyError:
        raise RuntimeError('flask-dynamo extension not registered on flask app'
            )
