docs: def to_sif(graph, output_path):
      """
      Generates Simple Interaction Format output file from provided graph.
  
      The SIF specification is described
      `here <http://wiki.cytoscape.org/Cytoscape_User_Manual/Network_Formats>`_.
  
      :func:`.to_sif` will generate a .sif file describing the network, and a few
      .eda and .noa files containing edge and node attributes, respectively. These
      are equivalent to tab-delimited tables, and can be imported as such in
      Cytoscape 3.0.
  
      Parameters
      ----------
      graph : networkx.Graph
          The Graph to be exported to SIF.
      output_path : str
          Full path, including filename (without suffix).
          e.g. using "./graphFolder/graphFile" will result in a SIF file at
          ./graphFolder/graphFile.sif, and corresponding .eda and .noa files.
  
      """
  
      warnings.warn("Removed in 0.8. Use write_csv instead.", DeprecationWarning)
  
      graph = _strip_list_attributes(graph)
  
      if output_path[-4:] == ".sif":
          output_path = output_path[:-4]
  
      if nx.number_of_nodes(graph) == 0:
          # write an empty file (for a non-existant graph)
          f = open(output_path + ".sif","w")
          f.write("")
          f.close()
  
      else:
          # write node files
          nodes = graph.nodes(data=True)
          for node in nodes:
              node_name = node[0]
              node_attribs = node[1]
              for key, value in node_attribs.iteritems():
                  # generate a node attribute file for each node attribute
                  if node == nodes[0]:
                      # first node, overwrite file
                      with open(output_path + "_" + key + ".noa",
                                "w") as f:
                          f.write(unicode(key) + '\n')
                          f.write(unicode(node_name).replace(" ","_") + " = " +
                                  unicode(value) + "\n")
                  else:
                      # not first, append file
                      with open(output_path + "_" + key + ".noa",
                                "a") as f:
                          f.write(unicode(node_name).replace(" ","_") + " = " +
                                  unicode(value) + "\n")
  
          if nx.number_of_edges(graph) == 0:
              # write an empty graph to a .sif file (just its nodes)
              for node in nodes:
                  node_name = node[0]
                  if node == nodes[0]:
                      # first node, overwrite file
                      with open(output_path + ".sif","w") as f:
                          f.write(unicode(node_name).replace(" ","_") + "\n")
                  else:
                      # not first, append file
                      with open(output_path + ".sif","a") as f:
                          f.write(unicode(node_name).replace(" ","_") + "\n")
  
          else:
              # write the graph to a .sif file as well as other edge
              # attribute files
  
              if graph.is_multigraph():
                  # then the NetworkX graph supports multiple interaction
                  # types just like the .sif format
                  edges = graph.edges(data=True, keys=True)
                  edge_attribs = set()
                  for edge in edges:
                      for key in edge[3].iterkeys():
                          edge_attribs.add(key)
  
                  # create edge attribute files
                  for attrib in edge_attribs:
                      str_attrib = unicode(attrib)
                      with open(output_path + '_' + str_attrib + ".eda","w") as f:
                          f.write(unicode(attrib) + "\n")
  
                  # add data to eda files and write sif file
                  with open(output_path + '.sif', 'w') as f:
                      for edge in edges:
                          node1 = unicode(edge[0]).replace(" ", "_")
                          node2 = unicode(edge[1]).replace(" ", "_")
                          intr_type = unicode(edge[2]).replace(" ", "_")
                          sif_line = node1 + ' ' + intr_type + ' ' + node2 + '\n'
                          f.write(sif_line)
  
                          for attrib, value in edge[3].iteritems():
                              eda_line = (node1 + ' (' + intr_type + ') ' +
                                          node2 + ' = ' + unicode(value) + '\n')
                              with open(output_path + '_' + unicode(attrib) + '.eda',
                                        'a') as g:
                                  g.write(eda_line)
  
              else:
                  # then we support only one interaction type 'rel'
                  edges = graph.edges(data=True)
                  edge_attribs = set()
                  for edge in edges:
                      for key in edge[2].iterkeys():
                          edge_attribs.add(key)
  
                  # create edge attribute files
                  for attrib in edge_attribs:
                      str_attrib = unicode(attrib)
                      with open(output_path + '_' + str_attrib + ".eda","w") as f:
                          f.write(unicode(attrib) + "\n")
  
                  # add data to eda files and write sif file
                  with open(output_path + '.sif', 'w') as f:
                      for edge in edges:
                          node1 = unicode(edge[0]).replace(" ", "_")
                          node2 = unicode(edge[1]).replace(" ", "_")
                          intr_type = 'rel'
                          sif_line = node1 + ' ' + intr_type + ' ' + node2 + '\n'
                          f.write(sif_line)
  
                          for attrib, value in edge[2].iteritems():
                              eda_line = (node1 + ' (' + intr_type + ') ' +
                                          node2 + ' = ' + unicode(value) + '\n')
                              with open(output_path + '_' + unicode(attrib) +
                                        '.eda', 'a') as g:
                                  g.write(eda_line)