def get_max_row_column(train, val, test):
    """Returns the total number of rows, columns from train, validation and test arrays in COO form."""
    r = max(max(train[:, 0]), max(val[:, 0]), max(test[:, 0])).astype(int) + 1
    c = max(max(train[:, 1]), max(val[:, 1]), max(test[:, 1])).astype(int) + 1
    return r, c