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

def _compose_pair(self, role, base):
        '''
        composes onto base by applying the role
        '''
        # apply transformations in role to base
        for attrname in dir(role):
            transformation = getattr(role, attrname)
            self._apply_transformation(role, base, transformation, attrname)

        return base