def test_negative_scalar_index(adata, index: int, obs: bool):
    pos_index = index + (adata.n_obs if obs else adata.n_vars)

    if obs:
        adata_pos_subset = adata[pos_index]
        adata_neg_subset = adata[index]
    else:
        adata_pos_subset = adata[:, pos_index]
        adata_neg_subset = adata[:, index]

    np.testing.assert_array_equal(
        adata_pos_subset.obs_names, adata_neg_subset.obs_names
    )
    np.testing.assert_array_equal(
        adata_pos_subset.var_names, adata_neg_subset.var_names
    )
def _wait_for_license_pool_state_to_activate(self, pool):
        error_values = ['EXPIRED', 'FAILED']
        # Wait no more than 5 minutes
        for x in range(1, 30):
            pool.refresh()
            if pool.state == 'LICENSED':
                return True
            elif pool.state == 'WAITING_FOR_EULA_ACCEPTANCE':
                pool.modify(
                    eulaText=pool.eulaText,
                    state='ACCEPTED_EULA'
                )
            elif pool.state in error_values:
                raise F5ModuleError(pool.errorText)
            time.sleep(10)