Get SQLStateGraph from state.

def get_sql_state(self, state):
        """
        Get SQLStateGraph from state.
        """
        if not hasattr(state, 'sql_state'):
            setattr(state, 'sql_state', SQLStateGraph())
        return state.sql_state