def METHOD_NAME(attribute_bounds):
    if not isinstance(attribute_bounds, dict):
        raise TypeError('attribute_bounds must be a dict mapping template to bounds; '
                        'got {}'.format(attribute_bounds))
    if len(attribute_bounds) != 1:
        raise NotImplementedError('Currently, only searches with exactly one template '
                                  'to bounds mapping are supported; got {}'
                                  .format(attribute_bounds))
    return {
        'attribute_bounds': {
            get_object_id(templ): bounds.as_dict()
            for templ, bounds in attribute_bounds.items()
        }
    }