<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def map(lst, serialize_func):
 """ Applies serialize_func to every element in lst """

    if not isinstance(lst, list):
        return lst
    return [serialize_func(e) for e in lst]