<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_variable_nodes(self):
 """ Returns variable nodes present in the graph. Before calling this method make sure that all the factors are added properly. Examples -------- ['a', 'b'] """

        self.check_model()

        variable_nodes = set([x for factor in self.factors for x in factor.scope()])
        return list(variable_nodes)