from typing import Tuple
import math


def get_figsize(
    number_of_metrics: int,
    graphs_per_row: int
) -> Tuple[int, int]:
    """Return tuple with the size of the given figures.

    Parameters
    -----------------------------------
    number_of_metrics: int,
        Number of the metrics to fit into figure.
    graphs_per_row: int,
        Number of graphs to put in each row.


    Returns
    -----------------------------------
    Width and height of the subplots.
    """
    return (
        min(number_of_metrics, graphs_per_row),
        math.ceil(number_of_metrics/graphs_per_row)
    )