def get_roi(image, coordinates):
    """
    Function to extract region of interest (roi) from image using coordinates.
    Input image: image as numpy array to extract from.
    Input coordinates: coordinates of roi in form of tuple (top, bottom, left, right)
    """
    roi = image[coordinates[0]:coordinates[1], coordinates[2]:coordinates[3]]
    return roi