parameters: (path, results, call_scope, position=None)
return_statement: return results_new
docstring: In each result, `path` must be followed. Copies the path iterator.
docstring_summary: In each result, `path` must be followed. Copies the path iterator.
docstring_tokens: In each result path must be followed . Copies the path iterator .
function: def follow_paths(path, results, call_scope, position=None):
      """
      In each result, `path` must be followed. Copies the path iterator.
      """
      results_new = []
      if results:
          if len(results) > 1:
              iter_paths = itertools.tee(path, len(results))
          else:
              iter_paths = [path]
  
          for i, r in enumerate(results):
              fp = follow_path(iter_paths[i], r, call_scope, position=position)
              if fp is not None:
                  results_new += fp
              else:
                  # This means stop iteration.
                  return results
      return results_new
function_tokens: def follow_paths ( path , results , call_scope , position = None ) : results_new = [ ] if results : if len ( results ) > 1 : iter_paths = itertools . tee ( path , len ( results ) ) else : iter_paths = [ path ] for i , r in enumerate ( results ) : fp = follow_path ( iter_paths [ i ] , r , call_scope , position = position ) if fp is not None : results_new += fp else : # This means stop iteration. return results return results_new