<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_template_from_path(filepath, paths=None):
 """ Return resolved path of given template file :param filepath: (Base) filepath of template file :param paths: A list of template search paths """

    if paths is None or not paths:
        paths = [os.path.dirname(filepath), os.curdir]

    for path in paths:
        candidate = os.path.join(path, filepath)
        if os.path.exists(candidate):
            return candidate

    LOGGER.warning("Could not find template=%s in paths=%s", filepath, paths)
    return None