<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def publish(self, user, provider, obj, comment, **kwargs):
        '''
            user - django User or UserSocialAuth instance
            provider - name of publisher provider
            obj - sharing object
            comment - string
        '''
        social_user = self._get_social_user(user, provider)
        backend = self.get_backend(social_user, provider, context=kwargs)
        return backend.publish(obj, comment)