class_docstr: Graph modality
  
  Parameters
  ----------
  data: List[str], required
      A list encoding an adjacency matrix, of a user or an item graph, in the sparse triplet format,         e.g., data=[('user1', 'user4', 1.0)].
class_docstr_tok: ["Graph","modality","Parameters","--","--","--","--","--","data",":","List","[","str","]",",","required","A","list","encoding","an","adjacency","matrix",",","of","a","user","or","an","item","graph",",","in","the","sparse","triplet","format",",","e.g.",",","data=","[","(","'user1","'",",","'user4","'",",","1.0",")","]","."]
docstr: Transform an asymmetric adjacency matrix to a symmetric one.
  
  Parameters
  ----------
  triplets: Python set, required
      A Python set representing an adjacency matrix in the sparse triplet format.
  
  Returns
  -------
  Python set representing a symmetric adjacency matrix.
docstr_tok: ["Transform","an","asymmetric","adjacency","matrix","to","a","symmetric","one",".","Parameters","--","--","--","--","--","triplets",":","Python","set",",","required","A","Python","set","representing","an","adjacency","matrix","in","the","sparse","triplet","format",".","Returns","--","--","--","-","Python","set","representing","a","symmetric","adjacency","matrix","."]
code: def _to_symmetric(triplets):
      """Transform an asymmetric adjacency matrix to a symmetric one.
  
      Parameters
      ----------
      triplets: Python set, required
          A Python set representing an adjacency matrix in the sparse triplet format.
  
      Returns
      -------
      Python set representing a symmetric adjacency matrix.
      """
      triplets.update([(j, i, v) for (i, j, v) in triplets])
      return triplets
  
file_path: cornac/cornac/data/graph.py
imports: import scipy.sparse
  import numpy
  from tqdm.auto import trange
  from .None import FeatureModality
label_desc: Use image node_id 9 for calling the GraphModality obj's underlying member method code with example usage: obj._to_symmetric(triplets) and returns: triplets