<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def project_roles(self, project):
 """Get a dict of role names to resource locations for a project. :param project: ID or key of the project to get roles from """

        path = 'project/' + project + '/role'
        _rolesdict = self._get_json(path)
        rolesdict = {}

        for k, v in _rolesdict.items():
            tmp = {}
            tmp['id'] = v.split("/")[-1]
            tmp['url'] = v
            rolesdict[k] = tmp
        return rolesdict