parameters: (sources)
return_statement: return base_files[0]
docstring: Given a set of sources, returns the one base.js file.
  
    Note that if zero or two or more base.js files are found, an error message
    will be written and the program will be exited.
  
    Args:
      sources: An iterable of _PathSource objects.
  
    Returns:
      The _PathSource representing the base Closure file.
docstring_summary: Given a set of sources, returns the one base.js file.
docstring_tokens: Given a set of sources returns the one base . js file .
function: def _GetClosureBaseFile(sources):
    """Given a set of sources, returns the one base.js file.
  
    Note that if zero or two or more base.js files are found, an error message
    will be written and the program will be exited.
  
    Args:
      sources: An iterable of _PathSource objects.
  
    Returns:
      The _PathSource representing the base Closure file.
    """
    base_files = [
        js_source for js_source in sources if _IsClosureBaseFile(js_source)]
  
    if not base_files:
      logging.error('No Closure base.js file found.')
      sys.exit(1)
    if len(base_files) > 1:
      logging.error('More than one Closure base.js files found at these paths:')
      for base_file in base_files:
        logging.error(base_file.GetPath())
      sys.exit(1)
    return base_files[0]
function_tokens: def _GetClosureBaseFile ( sources ) : base_files = [ js_source for js_source in sources if _IsClosureBaseFile ( js_source ) ] if not base_files : logging . error ( 'No Closure base.js file found.' ) sys . exit ( 1 ) if len ( base_files ) > 1 : logging . error ( 'More than one Closure base.js files found at these paths:' ) for base_file in base_files : logging . error ( base_file . GetPath ( ) ) sys . exit ( 1 ) return base_files [ 0 ]