def subset_matrix(matrix, name_list_1, name_list_2):
	"""Subsetting matrix into two symetric matrices given two label lists

	Parameter:
	----------
	matrix :  Pandas DataFrame
		Full similarity matrix
	name_list_1 : list
		list of names
	name_list_2 : list
		list of names

	Returns:
	--------
	list:
		list with subsets of matrix
	"""

	sim_matrix_1 = matrix[name_list_1].loc[name_list_1]
	sim_matrix_2 = matrix[name_list_2].loc[name_list_2]
	sim_matrix = matrix[name_list_1].loc[name_list_2]
	return sim_matrix_1, sim_matrix_2, sim_matrix