docs: def to_dataframe(network,
                   interaction='interaction',
                   default_interaction='-',
                   edges_attr_cols=[]):
      """
      Utility to convert a Cytoscape dictionary into a Pandas Dataframe.
  
      :param network: Dictionary to convert.
      :param interaction: Name of interaction column.
      :param default_interaction: Default value for missing interactions.
      :param edges_attr_cols: List containing other edges' attributes to include
          in the Dataframe, if present in network.
      :return: Converted Pandas Dataframe.
      """
  
      edges = network['elements']['edges']
      if edges_attr_cols is None:
          edges_attr_cols = []
      edges_attr_cols = sorted(edges_attr_cols)
  
      network_array = []
      # the set avoids duplicates
      valid_extra_cols = set()
      for edge in edges:
          edge_data = edge['data']
          source = edge_data['source']
          target = edge_data['target']
          if interaction in edge_data:
              itr = edge_data[interaction]
          else:
              itr = default_interaction
          extra_values = []
          for extra_column in edges_attr_cols:
              if extra_column in edge_data:
                  extra_values.append(edge_data[extra_column])
                  valid_extra_cols.add(extra_column)
          row = tuple([source, itr, target] + extra_values)
          network_array.append(row)
  
      return pd.DataFrame( network_array, columns=['source', 'interaction', 'target'] + sorted(valid_extra_cols))