Get User Roles: frappe.get_roles

This function doesn’t seem to be constructed correctly:

@frappe.whitelist()
def get_roles(arg=None):
	"""get roles for a user"""
	return frappe.get_roles(frappe.form_dict['uid']) // problem is the literal 'uid', which is not referenced anywhere else in the document

When I call frappe.core.doctype.user.user.get_roles() I get a key error (which makes sense):
KeyError: u'uid'

When I substitute a valid user name in the bench console I get the same key error.
frappe.get_roles(frappe.form_dict['tyler@agritheory.com'])
KeyError: u'tyler@agritheory.com'

I also can’t seem to find an instance of it actually being called, which makes me think it’s unused legacy code. It is not called in the test, test_user.py. My best guess is that it’s useful but unfinished. If I’m not using it correctly, I’d be thrilled to be corrected.

Yes this seems weird and is not used.

Maybe a topic for the frappe forum? https://discuss.frappe.io ?

I’ll move it over there. Shall I open an issue as well?