'Helper function to get the stream names for a user'

def get_streams(self, email, realm):

    user_profile = get_user(email, realm)
    subs = Subscription.objects.filter(user_profile=user_profile, active=True, recipient__type=Recipient.STREAM)
    return [cast(Text, get_display_recipient(sub.recipient)) for sub in subs]
