def _find_queue_item_id(self, master_base_url, changes_bid):
        """Looks in a Jenkins master's queue for an item, and returns the ID if found.
        Args:
            master_base_url (str): Jenkins master URL, in scheme://host form.
            changes_bid (str): The identifier for this Jenkins build, typically the JobStep ID.
        Returns:
            str: Queue item id if found, otherwise None.
        """
        xpath = QUEUE_ID_XPATH.format(job_id=changes_bid)
        try:
            response = self._get_text_response(
                master_base_url=master_base_url,
                path='/queue/api/xml/',
                params={
                    'xpath': xpath,
                    'wrapper': 'x',
                },
            )
        except NotFound:
            return None

        # it's possible that we managed to create multiple jobs in certain
        # situations, so let's just get the newest one
        try:
            match = etree.fromstring(response).iter('id').next()
        except __HOLE__:
            return None
        return match.text
dataset/ETHPy150Open dropbox/changes/changes/backends/jenkins/builder.py/JenkinsBuilder._find_queue_item_id