<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mk_template_paths(filepath, paths=None):
 """ Make template paths from given filepath and paths list. :param filepath: (Base) filepath of template file or None :param paths: A list of template search paths or None ['/tmp'] ['/etc', '/tmp'] ['/etc'] """

    if filepath is None:
        return [os.curdir] if paths is None else paths

    tmpldir = os.path.dirname(os.path.abspath(filepath))
    return [tmpldir] if paths is None else paths + [tmpldir]