@staticmethod
def cell_dimensions(grid_width: int, grid_height: int, grid_margin_x: int,
    grid_margin_y: int, n: int, m: int):
    """Return the cell width & height, given the grid width, grid height, cell offset, and number of rows (or columns).

        INPUT
        -----
        grid_width : int, total width of grid (including margins)

        grid_margins : Tuple[int, int], horizontal and vertical offset between edge of grid and its nearest cell

        n : int, number of rows (or columns) in the nxm matrix

        RETURN:
        -------
        Tuple[int, int], row & column number of corresponding cell
        """
    return int((grid_width - 2 * grid_margin_x) / n), int((grid_height - 2 *
        grid_margin_y) / m)
