def get_builder(b):
    try:
        return builder_names_cache[b['id']]
    except KeyError:
        try:
            parameters = json.loads(b['parameters_json'])
            name = parameters['builder_name']
        except (ValueError, KeyError) as error:
            print(('WARNING: failed to get builder name for build %s: %s' % (b['id'], error)))
            name = None
        builder_names_cache[b['id']] = name
        return name
def get_builder(b):
    try:
        return builder_names_cache[b['id']]
    except KeyError:
        try:
            parameters = json.loads(b['parameters_json'])
            name = parameters['builder_name']
        except (ValueError, KeyError) as error:
            print(('WARNING: failed to get builder name for build %s: %s' % (b['id'], error)))
            name = None
        builder_names_cache[b['id']] = name
        return name