Unable to assign a list value to a pendo variable

I have created a extension method where it returns the list of user roles when we pass the userId .Now I am supposed to assign this list to a pendo variable

When I assign the value to the variable(Community role).I am receiving the below error