<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_xref(self, id, xref):
 """ Adds an xref to the xref graph """

        # note: does not update meta object
        if self.xref_graph is None:
            self.xref_graph = nx.MultiGraph()
        self.xref_graph.add_edge(xref, id)