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

def getfunc(obj, name=''):
    '''Get the function corresponding to name from obj, not the method.'''
    if name:
        obj = getattr(obj, name)
    return getattr(obj, '__func__', obj)