def METHOD_NAME(dvvector, idx):  # pylint: disable=invalid-name
    _length = np.where(idx.ndarray == idx.size())[0]
    length = _length[0] if len(_length) != 0 else idx.size()
    result = dvvector.ndarray[idx.ndarray[:length]]
    return FakeThrustRTC.DVVector(result)