def _buildFeaturedText(self, b, data):
        u"""Build the featured item. If @self.style.itemRandom@ is **True**, then select a random item from the list.
        If there is no **data.item** available, then ignore this method."""
        return # TODO: fix this
        if not data.items:
            return
        s = self.style
        if s.itemRandom:
            item = choice(data.items)
        else:
            item = data.items[0]
        if s.label:
            b.h2(fontsize=s.labelSize, color=s.labelColor, margintop=s.labelMarginTop,
                marginbottom=s.labelMarginBottom, lineheight=s.labelLineHeight,
                media=(
                    Media(min=self.C.M_TABLET_MIN, max=self.C.M_TABLET_MAX, fontsize=s.tabletLabelSize, color='red'),
                    Media(max=self.C.M_MOBILE_MAX, color='blue')
                ))
            b.text(s.label)
            b._h2()
        b.a(href='/%s-%s' % (self.C.PARAM_ARTICLE, item.id), class_=self.C.CLASS_NAME)
        b.h2(fontsize=s.nameSize, fontweight=s.nameWeight, lineheight=s.nameLineHeight, 
             color=s.nameColor, marginbottom=s.nameMarginBottom, display=s.nameDisplay,
             margintop=s.nameMarginTop)
        b.text(item.name) 
        b._h2()
        b._a()
        if s.showPoster:
            b.a(href='/%s-%s' % (self.C.PARAM_ARTICLE, item.id), class_=self.C.CLASS_NAME)
            b.img(width=s.posterWidth, src=item.poster, float=self.C.LEFT, padding=0,
                margin=Margin(Em(0.5), Em(0.5), 0, 0),
                media=Media(max=self.C.M_MOBILE_MAX, display=self.C.NONE)
            )
            b._a()
        if s.showLevel:
            b.h5(class_=self.C.CLASS_LEVEL, color=s.levelColor, fontsize=s.levelSize, fontweight=s.levelWeight,
                margintop=s.levelMarginTop, lineheight=s.levelLineHeight)
            b.text(item.level or s.genericLevel)
            b.text(' level')
            b._h5()
        if item.author: # Test on text
            b.a(href='/%s-%s' % (self.C.PARAM_AUTHOR, item.author), class_=self.C.CLASS_AUTHOR)
            b.h5(fontsize=s.authorSize, fontweight=s.authorWeight, color=s.authorColor, 
                 lineheight=s.authorLineHeight, display=s.authorDisplay)
            b.text('By %s' % item.author)
            b._h5()
            b._a()
        if s.showCategory and item.category: # Text on text
            b.a(href='/%s-%s' % (self.C.PARAM_CATEGORY, item.category), class_=self.C.CLASS_CATEGORY)
            b.h5(fontsize=s.categorySize, fontweight=s.categoryWeight, lineheight=s.categoryLineHeight, 
                 color=s.categoryColor, margintop=Em(1), display=self.C.BLOCK)
            b.text(item.category)
            b._h5()
            b._a()
        if item.summary is not None: # Test on element. Summary elements tag must be defined by generic style.
            b.div(class_='featuredSummary', clear=self.C.BOTH, float=self.C.LEFT, width=Perc(100), 
                color=s.summaryColor, fontsize=s.summarySize, lineheight=s.summaryLineHeight, 
                margintop=s.summaryMarginTop, marginbottom=s.summaryMarginBottom)
            if isinstance(item.summary, basestring):
                b.text(item.summary)
            else:
                self.buildElement(b, item.summary)
            b._div()
dataset/ETHPy150Open petrvanblokland/Xierpa3/xierpa3/components/_legacy/featured.py/FeaturedByText._buildFeaturedText/original