code: def get_redirect(paths):
      
  
      if isinstance(paths, str):
          paths = [paths]
  
      for path in paths:
          url, permanent = get_alias(path)
          if url:
              return redirect(url, 301 if permanent else 302)
  
          url, permanent = current_app.get_path_regex(path)
          if url:
              return redirect(url, 301 if permanent else 302)
  
      return None
docs: Get a redirect from a path or list of paths
  
      Arguments:
  
      paths -- either a single path string, or a list of paths to check
  
      Returns: a flask.redirect() result