Exactly.
In what capacity were you studying?
Oh, I was just an intern for Google for six months. As part of that, I did some courses.
This describes in what capacity you studied.
.
The common interpretation of "to some degree" is natural, as "the role taken" is similar to "the degree" but this interpretation is not the primary meaning.