def _create_facilities(handler, facilities=None):
    """Initialize a facilities dictionary."""
    if facilities is None:
        facilities = dict()
    for facility in handler.facility_names.keys():
        if getattr(handler, 'LOG_%s' % facility.upper(), None) is not None:
            facilities[facility] = handler.facility_names[facility]
    return facilities