'Wrapper that returns a test image.'

@classmethod
def create_image(cls, data=None, **kwargs):

    if ('name' not in kwargs):
        name = data_utils.rand_name((cls.__name__ + '-image'))
        kwargs['name'] = name
    params = cls._get_create_params(**kwargs)
    if data:
        params['data'] = data
    image = cls.client.create_image(**params)
    if ('image' in image):
        image = image['image']
    cls.created_images.append(image['id'])
    return image
