def duplication_divergence_iky(n, s, **kwargs):
	seed = kwargs.pop('seed',None)
	directed = kwargs.pop('directed',False)
	graph = kwargs.pop('graph',None)
	
	if graph is not None:
		if len(graph) > 0:
			raise ZenException, 'the graph must be empty, if provided'
		if graph.is_directed() != directed:
			raise ZenException, 'graph and directed arguments must agree'
	
	if len(kwargs) > 0:
		raise ZenException, 'Unknown arguments: %s' % ', '.join(kwargs.keys())
		
	if seed is None:
		seed = -1
		
	# initialize the random number generator
	if seed >= 0:
		random.seed(seed)
			
	if type(n) != int:
		raise ZenException, 'Parameter n must be an integer'
	if type(s) != float and type(s) != int and type(s) != double:
		print type(s)
		raise ZenException, 'Parameter s must be a float, double, or an int'
		
	G = graph
	if graph is None:
		if directed:
			G = DiGraph()
		else:
			G = Graph()
		
	# initialize the graph with two connected nodes
	G.add_edge(0,1)
		
	# build the rest of the graph
	i = 2
	while i < n:
		
		# pick an existing node to copy
		cn_seed = random.randint(0,100000)
		u = choose_node(G,seed=cn_seed)
		
		#####
		# create the partial copy
		G.add_node(i)
		
		# copy edges
		if not directed:
			for w in G.neighbors(u):
				if random.random() <= s:
					G.add_edge(i,w)
		else:
			for w in G.in_neighbors(u):
				if random.random() <= s:
					G.add_edge(w,i)
			for w in G.out_neighbors(u):
				if random.random() <= s:
					G.add_edge(i,w)
					
		# if the node doesn't have any connections, then ditch it
		if G.degree(i) == 0:
			G.rm_node(i)
		else:
			i += 1
					
	# done!
	return G
		
####
# TODO: Implement duplication_divergence_wagner

###
# TODO: Implement duplication_mutation
Generate a random graph using the duplication-divergence model proposed by Ispolatov, Krapivski, and Yuryev (2008).
dataset/ETHPy150Open networkdynamics/zenlib/src/zen/generating/duplication.py/duplication_divergence_iky