<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pw_score_cosine(self, s1 : ClassId, s2 : ClassId) -> SimScore: """ Cosine similarity of two subjects Arguments --------- s1 : str class id Return ------ number A number between 0 and 1 """

        df = self.assoc_df
        slice1 = df.loc[s1].values
        slice2 = df.loc[s2].values
        return 1 - cosine(slice1, slice2)