'Find all definitions of the given variable.
:param SimVariable variable:
:param bool simplified_graph: True if you just want to search in the simplified graph instead of the normal
graph. Usually the simplified graph suffices for finding definitions of register
or memory variables.
:return: A collection of all variable definitions to the specific variable.
:rtype: list'

def find_definitions(self, variable, simplified_graph=True):

    if simplified_graph:
        graph = self.simplified_data_graph
    else:
        graph = self.graph
    defs = []
    for n in graph.nodes_iter():
        if (n.variable == variable):
            defs.append(n)
    return defs
