parameters: (item)
return_statement: return hits[0]
docstring: Locates a file relative to some BUILD_ROOT.
  
      :param item: item to locate at some build root
      :return: build root that item was found at
docstring_summary: Locates a file relative to some BUILD_ROOT.
docstring_tokens: Locates a file relative to some BUILD_ROOT .
function: def locate_build_root(item):
      """
      Locates a file relative to some BUILD_ROOT.
  
      :param item: item to locate at some build root
      :return: build root that item was found at
      """
      search_locations = get_build_roots()
      occurrences = map(lambda build: os.path.join(build, item), search_locations)
      hits = list(filter(os.path.exists, occurrences))
      if not hits:
          raise BuildRootMissingException(item)
      elif len(hits) > 1:
          raise BuildRootCollisionException(hits)
      return hits[0]
function_tokens: def locate_build_root ( item ) : search_locations = get_build_roots ( ) occurrences = map ( lambda build : os . path . join ( build , item ) , search_locations ) hits = list ( filter ( os . path . exists , occurrences ) ) if not hits : raise BuildRootMissingException ( item ) elif len ( hits ) > 1 : raise BuildRootCollisionException ( hits ) return hits [ 0 ]