def bbox_coord_extractor(annotations,file_name,buff=10):
    """Extract the annotations, which originally are formatted as the top left corner (x,y) and the picture's
       height and width. Optionally enlarge the bounding box with a buffer.
       
       Args:
           annotations (dict) : dictionary of image annotations
           file_name (str) : name of the file to extract bounding boxes for
           buff (int) : optionally add additional padding around the bounding box
        
        Returns:
            bboxes (list) : list of bounding boxes for the given image with each
            bounding box in the form: [x_min, y_min, x_max, y_max]
    """
    bboxes=[]
    for a in annotations[file_name]['annotations']:
        x_min,y_min,height,width = a['x']-buff,a['y']-buff,a['height'],a['width']
        x_max = x_min+width+2*buff
        y_max = y_min+height+2*buff
        
        coords = [x_min,y_min,x_max,y_max]
                
        bboxes.append(coords)
    return bboxes