(self, sources)
Provides a default legend for a set of sources.

        Legends are sets of (source_list, #hexcolor) pairs. The helper method
        _svc is good at generating these. The legend produced by this default
        is:

        * If there's only one source, then the legend text is the last component
            of the source.
        * If there's more than once source, the legend text is the set of unique
            suffixes in the list of sources. So if there are three sources:
                ['a', 'b', 'c'], ['a', 'd', 'e'], and ['a', 'f', 'g']
            then the legend texts would be [['b', 'c'], ['d', 'e'], ['f', 'g']]

        Components of the legend are cleaned up according to self.path_splitter.
        See _maybe_right_split for more details.
Provides a default legend for a set of sources.
Provides a default legend for a set of sources .
def legend(self, sources):
        """Provides a default legend for a set of sources.

        Legends are sets of (source_list, #hexcolor) pairs. The helper method
        _svc is good at generating these. The legend produced by this default
        is:

        * If there's only one source, then the legend text is the last component
            of the source.
        * If there's more than once source, the legend text is the set of unique
            suffixes in the list of sources. So if there are three sources:
                ['a', 'b', 'c'], ['a', 'd', 'e'], and ['a', 'f', 'g']
            then the legend texts would be [['b', 'c'], ['d', 'e'], ['f', 'g']]

        Components of the legend are cleaned up according to self.path_splitter.
        See _maybe_right_split for more details.
        """
        if len(sources) == 1:
            return self._svc([[sources[0][-1]]])
        else:
            return self._svc(unique_suffixes(sources, splitter=self.path_splitter))
def legend ( self , sources ) : if len ( sources ) == 1 : return self . _svc ( [ [ sources [ 0 ] [ - 1 ] ] ] ) else : return self . _svc ( unique_suffixes ( sources , splitter = self . path_splitter ) )