System.perspective.getSessionInfo()

Hi guys, as I know that Ignition gateway has a page called Perspective Sessions. May I know that it is possible to display all the data there in my project and display in a table format. From what I research I know that there is a script called ( System.perspective.getSessionInfo() ) can do it but I had try many times already it still cant work for me. May I know that anyone here have the example of these script.

Thanks in advance

	sessions = system.perspective.getSessionInfo()
	data = []
	for session in sessions:
		keys = session.keys()
		newRow = []
		for key in keys:
			newRow.append(str(session[key]))
		data.append(newRow)
	self.getSibling("Table").props.data = system.dataset.toDataSet(keys, data)