def METHOD_NAME(self, reports):
    # Only use OAuth if basic auth has not been specified
    if not self.auth:
        request = yield self.oauthhttp.post("", data=_GET_TOKEN_DATA)
        if request.code != 200:
            content = yield request.content()
            log.msg(f"{request.code}: unable to authenticate to Bitbucket {content}")
            return
        token = (yield request.json())['access_token']
        self._http.updateHeaders({'Authorization': f'Bearer {token}'})
    build = reports[0]['builds'][0]
    if build['complete']:
        status = BITBUCKET_SUCCESSFUL if build['results'] == SUCCESS else BITBUCKET_FAILED
    else:
        status = BITBUCKET_INPROGRESS
    props = Properties.fromDict(build['properties'])
    props.master = self.master
    def key_hash(key):
        sha_obj = hashlib.sha1()
        sha_obj.update(key.encode('utf-8'))
        return sha_obj.hexdigest()
    status_key = yield props.render(self.status_key)
    body = {
        'state': status,
        'key': key_hash(status_key),
        'name': (yield props.render(self.status_name)),
        'description': reports[0]['subject'],
        'url': build['url']
    }
    for sourcestamp in build['buildset']['sourcestamps']:
        if not sourcestamp['repository']:
            log.msg(f"Empty repository URL for Bitbucket status {body}")
            continue
        owner, repo = self.get_owner_and_repo(sourcestamp['repository'])
        endpoint = (owner, repo, 'commit', sourcestamp['revision'], 'statuses', 'build')
        bitbucket_uri = f"/{'/'.join(endpoint)}"
        if self.debug:
            log.msg(f"Bitbucket status {bitbucket_uri} {body}")
        response = yield self._http.post(bitbucket_uri, json=body)
        if response.code not in (200, 201):
            content = yield response.content()
            log.msg(f"{response.code}: unable to upload Bitbucket status {content}")