def _find_build_no(self, master_base_url, job_name, changes_bid):
        """Looks in a Jenkins master's list of current/recent builds for one with the given CHANGES_BID,
        and returns the build number if found.

        Args:
            master_base_url (str): Jenkins master URL, in scheme://host form.
            job_name (str): Name of the Jenkins project/job to look for the build in; ex: 'generic_build'.
            changes_bid (str): The identifier for this Jenkins build, typically the JobStep ID.
        Returns:
            str: build number of the build if found, otherwise None.
        """
        xpath = BUILD_ID_XPATH.format(job_id=changes_bid)
        try:
            response = self._get_text_response(
                master_base_url=master_base_url,
                path='/job/{job_name}/api/xml/'.format(job_name=job_name),
                params={
                    'depth': 1,
                    '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('number').next()
        except __HOLE__:
            return None
        return match.text
dataset/ETHPy150Open dropbox/changes/changes/backends/jenkins/builder.py/JenkinsBuilder._find_build_no