<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_buildroot_koji(self, buildroot, output):
 """ put the final koji information in the buildroot under extra.osbs """

        docker = output[1]['extra']['docker']

        name = ''
        for tag in docker['tags']:
            for repo in docker['repositories']:
                if tag in repo:
                    iname = ImageName.parse(repo)
                    name = iname.to_str(registry=False)
                    break

        buildroot['extra']['osbs']['koji'] = {
            'build_name': name,
            'builder_image_id': docker.get('digests', {})
        }