def get_dimensions(matrix):
    """
    A helper function to get the dimensions of the matrix

    Args:
        matrix (2D array): A 2D array that is
            representing a matrix

    Returns:
        tuple : A tuple containing the dimensions of
            the matrix
    """
    return len(matrix), len(matrix[0])