code: def find_template_from_path(filepath, paths=None):
      
      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
docs: Return resolved path of given template file
  
      :param filepath: (Base) filepath of template file
      :param paths: A list of template search paths