parameters: (outdir, mode, indir, infiles, data)
return_statement: return result, data
docstring: Main function to isolate a target with its dependencies.
  
    Arguments:
    - outdir: Output directory where the result is stored. Depends on |mode|.
    - indir: Root directory to be used as the base directory for infiles.
    - infiles: List of files, with relative path, to process.
    - mode: Action to do. See file level docstring.
    - data: Contains all the command specific meta-data.
  
    Some arguments are optional, dependending on |mode|. See the corresponding
    MODE<mode> function for the exact behavior.
docstring_summary: Main function to isolate a target with its dependencies.
docstring_tokens: Main function to isolate a target with its dependencies .
function: def isolate(outdir, mode, indir, infiles, data):
    """Main function to isolate a target with its dependencies.
  
    Arguments:
    - outdir: Output directory where the result is stored. Depends on |mode|.
    - indir: Root directory to be used as the base directory for infiles.
    - infiles: List of files, with relative path, to process.
    - mode: Action to do. See file level docstring.
    - data: Contains all the command specific meta-data.
  
    Some arguments are optional, dependending on |mode|. See the corresponding
    MODE<mode> function for the exact behavior.
    """
    modes = {
      'check': MODEcheck,
      'hashtable': MODEhashtable,
      'remap': MODEremap,
      'run': MODErun,
      'trace': MODEtrace,
    }
    mode_fn = modes[mode]
  
    infiles = expand_directories(
        indir, infiles, lambda x: re.match(r'.*\.(git|svn|pyc)$', x))
  
    # Only hashtable mode really needs the sha-1.
    level = {
      'check': NO_INFO,
      'hashtable': WITH_HASH,
      'remap': STATS_ONLY,
      'run': STATS_ONLY,
      'trace': STATS_ONLY,
    }
    # Regenerate data['files'] from infiles.
    data['files'] = process_inputs(
        data.get('files', {}), indir, infiles, level[mode], data.get('read_only'))
  
    result = mode_fn(outdir, indir, data)
    return result, data
function_tokens: def isolate ( outdir , mode , indir , infiles , data ) : modes = { 'check' : MODEcheck , 'hashtable' : MODEhashtable , 'remap' : MODEremap , 'run' : MODErun , 'trace' : MODEtrace , } mode_fn = modes [ mode ] infiles = expand_directories ( indir , infiles , lambda x : re . match ( r'.*\.(git|svn|pyc)$' , x ) ) # Only hashtable mode really needs the sha-1. level = { 'check' : NO_INFO , 'hashtable' : WITH_HASH , 'remap' : STATS_ONLY , 'run' : STATS_ONLY , 'trace' : STATS_ONLY , } # Regenerate data['files'] from infiles. data [ 'files' ] = process_inputs ( data . get ( 'files' , { } ) , indir , infiles , level [ mode ] , data . get ( 'read_only' ) ) result = mode_fn ( outdir , indir , data ) return result , data