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

def types(self):
        ''' Returns an iterator over the types of the neurites in the object.
            If the object is a tree, then one value is returned.
        '''
        neurites = self._obj.neurites if hasattr(self._obj, 'neurites') else (self._obj,)
        return (neu.type for neu in neurites)