'Deletes all nodes associated with a course. Normally `run` executes
an arbitrary query, but in our code, we only use it to delete nodes
associated with a course.
Args:
query: query string to be executed (in this case, to delete all
nodes associated with a course)'

def run(self, query):

    start_string = u"WHERE    n.course_key='"
    start = (query.index(start_string) + len(start_string))
    query = query[start:]
    end = query.find(u"'")
    course_key = query[:end]
    self.graph.nodes = set([node for node in self.graph.nodes if (node[u'course_key'] != course_key)])
