Writing networkTable, nodes and edges to Perseus readable format.
    
    :param folder: Path to output directory.
    :param network_table: Network table.
    :param networks: Dictionary with node and edge tables, indexed by network guid.

def write_networks(folder, network_table, networks):
    """
    Writing networkTable, nodes and edges to Perseus readable format.
    
    :param folder: Path to output directory.
    :param network_table: Network table.
    :param networks: Dictionary with node and edge tables, indexed by network guid.
    """
    makedirs(folder, exist_ok=True) 
    network_table.to_perseus(path.join(folder, 'networks.txt'), main_columns=[])
    for guid, network in networks.items():
        network['node_table'].to_perseus(path.join(folder, '{}_nodes.txt'.format(guid)), main_columns=[])
        network['edge_table'].to_perseus(path.join(folder, '{}_edges.txt'.format(guid)), main_columns=[])