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

def get_mod(cls):

    '''Returns the string identifying the module that cls is defined in.
    '''
    if isinstance(cls, (type, types.FunctionType)):
        ret = cls.__module__
    else:
        ret = cls.__class__.__module__
    return ret