def create_image_bdm(image_ref, boot_index=0):
 return BlockDeviceDict({'source_type': 'image', 'image_id': image_ref, 'delete_on_termination': True, 'boot_index': boot_index, 'device_type': 'disk', 'destination_type': 'local'})

def create_image_bdm ( image_ref , boot_index = 0 ) : return BlockDeviceDict ( { 'source_type' : 'image' , 'image_id' : image_ref , 'delete_on_termination' : True , 'boot_index' : boot_index , 'device_type' : 'disk' , 'destination_type' : 'local' } )
create a block device dict based on the image_ref .