def get(self, hostname):
        """**Get a specific Host**

        **Example Request:**

        .. sourcecode:: http

            GET /api/v1/hosts/example HTTP/1.1
            Host: localhost

        **Example response:**

        .. sourcecode:: http

            HTTP/1.1 200 OK
            Content-Type: application/json

            {
                "status": "ok",
                "id": 1,
                "hostname": "example",
                "labors": [],
                "quests": [],
                "events": [],
                "href": "/api/v1/hosts/example",
                "limit": 10,
                "offset": 0,
                "lastEvent": "2015-05-05 22:13:11"
            }

        :param hostname: hostname of the Host to retrieve
        :type hostname: string

        :query string expand: (*optional*) supports labors, events, eventtypes, quests
        :query int limit: (*optional*) Limit result of child resources.
        :query int offset: (*optional*) Skip the first N child resources.

        :statuscode 200: The request was successful.
        :statuscode 401: The request was made without being logged in.
        :statuscode 404: The Host was not found.
        """
        offset, limit, expand = self.get_pagination_values()
        host = self.session.query(Host).filter_by(hostname=hostname).scalar()
        if not host:
            raise exc.NotFound("No such Host {} found".format(hostname))

        json = host.to_dict(self.href_prefix)
        json["limit"] = limit
        json["offset"] = offset

        # add the labors and quests
        labors = []
        quests = []

        # We will perform labor and quest expansion here b/c we want to apply
        # limits and offsets
        for labor in (
                host.get_labors().limit(limit).offset(offset)
                .from_self().order_by(Labor.creation_time).all()
        ):
            if expand in "labors":
                labors.append(
                    labor.to_dict(
                        base_uri=self.href_prefix, expand=set(expand)
                    )
                )
            else:
                labors.append({
                    "id": labor.id, "href": labor.href(self.href_prefix)
                })

            if labor.quest and "quests" in expand:
                quests.append(
                    labor.quest.to_dict(self.href_prefix, expand=set(expand))
                )
            elif labor.quest:
                quests.append(
                    {
                        "id": labor.quest.id,
                        "href": labor.quest.href(self.href_prefix)
                    }
                )
        json["labors"] = labors
        json["quests"] = quests

        # We will perform the events expansion here b/c we want to apply
        # limits and offsets
        events = []
        last_event = host.get_latest_events().first()
        for event in (
                host.get_latest_events().limit(limit).offset(offset)
                .from_self().order_by(Event.timestamp).all()
        ):
            if "events" in expand:
                events.append(
                    event.to_dict(
                        base_uri=self.href_prefix, expand=set(expand)
                    )
                )
            else:
                events.append({
                    "id": event.id, "href": event.href(self.href_prefix)
                })

        if last_event:
            json["lastEvent"] = str(last_event.timestamp)
        else:
            json["lastEvent"] = None
        json["events"] = events

        self.success(json)
dataset/ETHPy150Open dropbox/hermes/hermes/handlers/api.py/HostHandler.get/swapped operands of `in`