def check_dataframes(m1, m2):
    """Check if 2 dataframes have the same shape and share the same index column.

    Args:
        m1 (DataFrame): first dataframe
        m2 (DataFrame): second dataframe
    Returns:
        bool:           Whether the conditions are satisfied
    """
    if m1.shape == m2.shape and set(m1.index) == set(m2.index):
        return True
    else:
        return False