'Lazily build the facet map.'

def _BuildFacetMap(self):

    if (self._facet_map is None):
        facet_map = {}
        for facet in self._facets:
            facet_map.setdefault(facet.name, []).append(facet)
        self._facet_map = facet_map
    return self._facet_map
