def crop_frame(img, width, height, x, y):
    """
    Returns a crop of image (frame) based on specified parameters
    
    Parameters
    ----------
    img : array, required
        Array representing an image (frame)
    width : int, required
        Width of the crop
    height : int, required
        Height of the crop
    x : int, required
        X position of the crop, by default None
    y : int, required
        Y position of the crop, by default None
    
    Returns
    -------
    array
        Cropped image (frame) based on input parameters
    """
    img = img[y:y+height, x:x+width]
    return img