<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def transform(self, arg, *args, **kwargs):
 """ Call function producing a like-indexed Series on each group and return a Series with the transformed values. Parameters arg : function To apply to each group. Should return a Series with the same index. Returns ------- transformed : Series Examples -------- """

        return self._selected_obj.groupby(self.groupby).transform(
            arg, *args, **kwargs)