@classmethod
    def fromVisualization(cls, target, others):
        """
        Create a L{Description} from a L{Thing} and some L{Paths} visually
        related to that L{Thing}.

        @param target: The L{IThing} being described by this L{Description}.
        @type target: L{IThing}

        @param others: Paths to items that are visible as portions of the
            target.
        @type others: L{list} of L{Path <imaginary.idea.Path>}s.

        @return: A L{Description} comprising C{target} and C{others}.
        """
        exits = []
        for other in others:
            # All of others are paths that go through target so just
            # using targetAs won't accidentally include any exits that aren't
            # for the target room except for the bug mentioned below.
            #
            # TODO: This might show too many exits.  There might be exits to
            # rooms with exits to other rooms, they'll all show up as on some
            # path here as IExit targets.  Check the exit's source to make sure
            # it is target.
            anExit = other.targetAs(IExit)
            if anExit is not None:
                exits.append(anExit)

        exits.sort(key=lambda anExit: anExit.name)

        descriptionConcepts = []

        for pup in target.powerupsFor(iimaginary.IDescriptionContributor):
            descriptionConcepts.append(pup.contributeDescriptionFrom(others))

        def index(c):
            # https://github.com/twisted/imaginary/issues/63
            preferredOrder = [
                'ExpressCondition',
                'ExpressClothing',
            ]
            try:
                return preferredOrder.index(c.__class__.__name__)
            except __HOLE__:
                # Anything unrecognized goes after anything recognized.
                return len(preferredOrder)

        descriptionConcepts.sort(key=index)

        return cls(
            title=Noun(target).shortName(),
            exits=exits,
            description=target.description,
            components=descriptionConcepts,
            target=target,
        )
dataset/ETHPy150Open twisted/imaginary/imaginary/language.py/Description.fromVisualization