<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_ref(self, ref, attr=None):
 """Add reference to resource :param ref: reference to add :type ref: Resource :rtype: Resource """

        self.session.add_ref(self, ref, attr)
        return self.fetch()