parameters: (relative_root, infiles)
return_statement: return deepest_root.replace('/', os.path.sep)
docstring: For a list of infiles, determines the deepest root directory that is
    referenced indirectly.
  
    All the paths are processed as posix-style but are eventually returned as
    os.path.sep.
docstring_summary: For a list of infiles, determines the deepest root directory that is
    referenced indirectly.
docstring_tokens: For a list of infiles determines the deepest root directory that is referenced indirectly .
function: def determine_root_dir(relative_root, infiles):
    """For a list of infiles, determines the deepest root directory that is
    referenced indirectly.
  
    All the paths are processed as posix-style but are eventually returned as
    os.path.sep.
    """
    # The trick used to determine the root directory is to look at "how far" back
    # up it is looking up.
    relative_root = relative_root.replace(os.path.sep, '/')
    deepest_root = relative_root
    for i in infiles:
      x = relative_root
      i = i.replace(os.path.sep, '/')
      while i.startswith('../'):
        i = i[3:]
        assert not i.startswith('/')
        x = posixpath.dirname(x)
      if deepest_root.startswith(x):
        deepest_root = x
    deepest_root = deepest_root.replace('/', os.path.sep)
    logging.debug(
        'determine_root_dir(%s, %s) -> %s' % (
            relative_root, infiles, deepest_root))
    return deepest_root.replace('/', os.path.sep)
function_tokens: def determine_root_dir ( relative_root , infiles ) : # The trick used to determine the root directory is to look at "how far" back # up it is looking up. relative_root = relative_root . replace ( os . path . sep , '/' ) deepest_root = relative_root for i in infiles : x = relative_root i = i . replace ( os . path . sep , '/' ) while i . startswith ( '../' ) : i = i [ 3 : ] assert not i . startswith ( '/' ) x = posixpath . dirname ( x ) if deepest_root . startswith ( x ) : deepest_root = x deepest_root = deepest_root . replace ( '/' , os . path . sep ) logging . debug ( 'determine_root_dir(%s, %s) -> %s' % ( relative_root , infiles , deepest_root ) ) return deepest_root . replace ( '/' , os . path . sep )