def get_user_roles(self, uid, project_id=None):
        """Retrieve list of roles for user (or user and project)"""
        if project_id is None:
            roles = db.user_get_roles(context.get_admin_context(), uid)
            return roles
        else:
            roles = db.user_get_roles_for_project(context.get_admin_context(),
                                                  uid, project_id)
            return roles
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/auth/dbdriver.py/DbDriver.get_user_roles/original