Linguistic anthropology

A bilingual student uses one language with grandparents, shifts to another with classmates, and alternates languages during a family celebration to mark humor and solidarity. Which interpretation best fits this pattern?