parameters: (path, base_path_components)
return_statement: return '/'.join(base_path_components[0:len(base_path_components) - depth]) + \
        '/' + path
docstring: Resolves |path|, which starts with at least one '../'. Returns an empty
    string if the path shouldn't be considered. See _AddSources() for a
    description of |base_path_components|.
docstring_summary: Resolves |path|, which starts with at least one '../'. Returns an empty
    string if the path shouldn't be considered. See _AddSources() for a
    description of |base_path_components|.
docstring_tokens: Resolves |path| which starts with at least one .. / . Returns an empty string if the path shouldn t be considered . See _AddSources () for a description of |base_path_components| .
function: def _ResolveParent(path, base_path_components):
    """Resolves |path|, which starts with at least one '../'. Returns an empty
    string if the path shouldn't be considered. See _AddSources() for a
    description of |base_path_components|."""
    depth = 0
    while path.startswith('../'):
      depth += 1
      path = path[3:]
    # Relative includes may go outside the source tree. For example, an action may
    # have inputs in /usr/include, which are not in the source tree.
    if depth > len(base_path_components):
      return ''
    if depth == len(base_path_components):
      return path
    return '/'.join(base_path_components[0:len(base_path_components) - depth]) + \
        '/' + path
function_tokens: def _ResolveParent ( path , base_path_components ) : depth = 0 while path . startswith ( '../' ) : depth += 1 path = path [ 3 : ] # Relative includes may go outside the source tree. For example, an action may # have inputs in /usr/include, which are not in the source tree. if depth > len ( base_path_components ) : return '' if depth == len ( base_path_components ) : return path return '/' . join ( base_path_components [ 0 : len ( base_path_components ) - depth ] ) + '/' + path