def share(self, institute, case, collaborator_id, user, link):
if collaborator_id in case.get('<STR_LIT>', []):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>self.create_event(<EOL>institute=institute,<EOL>case=case,<EOL>user=user,<EOL>link=link,<EOL>category='<STR_LIT>',<EOL>verb='<STR_LIT>',<EOL>subject=collaborator_id<EOL>)<EOL>updated_case = self.case_collection.find_one_and_update(<EOL>{'<STR_LIT>': case['<STR_LIT>']},<EOL>{<EOL>'<STR_LIT>': {'<STR_LIT>': collaborator_id}<EOL>},<EOL>return_document=pymongo.ReturnDocument.AFTER<EOL>)<EOL>LOG.debug("<STR_LIT>")<EOL>return updated_case<EOL>
Share a case with a new institute.

        Arguments:
            institute (dict): A Institute object
            case (dict): Case object
            collaborator_id (str): A instute id
            user (dict): A User object
            link (str): The url to be used in the event

        Return:
            updated_case