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

def safestr(str_):
    ''' get back an alphanumeric only version of source '''
    str_ = str_ or ""
    return "".join(x for x in str_ if x.isalnum())