class_docstr: A custom graph to represent a query. Has additional helper methods specific to adding TypeQL patterns.
docstr: Add an edge to represent the role a variable plays in a relation
  Args:
      relation_var: The variable of the relation
      roleplayer_var: The variable of the roleplayer in the relation
      role_label: The role the roleplayer plays in the relation
  
  Returns:
      self
docstr_tok: ["Add","an","edge","to","represent","the","role","a","variable","plays","in","a","relation","Args",":","relation_var",":","The","variable","of","the","relation","roleplayer_var",":","The","variable","of","the","roleplayer","in","the","relation","role_label",":","The","role","the","roleplayer","plays","in","the","relation","Returns",":","self"]
code: def add_role_edge(self, relation_var, roleplayer_var, role_label):
      """
      Add an edge to represent the role a variable plays in a relation
      Args:
          relation_var: The variable of the relation
          roleplayer_var: The variable of the roleplayer in the relation
          role_label: The role the roleplayer plays in the relation
  
      Returns:
          self
      """
      self.add_edge(relation_var, roleplayer_var, type=role_label)
      return self
  
file_path: typedb-ml/typedb_ml/networkx/query_graph.py
imports: import networkx
label_desc: Use image node_id 3 for calling the QueryGraph obj's underlying member method code with example usage: obj.add_role_edge(relation_var, roleplayer_var, role_label) and returns: self