def METHOD_NAME(mapdl, cube_geom_and_mesh, func, entity, selector, imax):
    func_ = getattr(mapdl, func)
    func_("S", vmin=1, vmax=imax)
    if entity in ["nodes", "elem"]:
        count = getattr(mapdl.mesh, selector)
    else:
        count = getattr(mapdl.geometry, selector)
    assert len(count) == imax
    mapdl.cm("mycomp", entity)
    assert "mycomp" in mapdl.components
    assert len(mapdl.components["mycomp"]) == imax
    assert np.allclose(mapdl.components["mycomp"], list(range(1, imax + 1)))