def METHOD_NAME(cls, obj_ids, num_returns=None):
    """
    Wait on the objects without materializing them (blocking operation).
    Parameters
    ----------
    obj_ids : list, scalar
    num_returns : int, optional
    """
    if not isinstance(obj_ids, list):
        obj_ids = [obj_ids]
    if num_returns is None:
        num_returns = len(obj_ids)
    if num_returns == len(obj_ids):
        METHOD_NAME(obj_ids, return_when="ALL_COMPLETED")
    else:
        # Dask doesn't natively support `num_returns` as int.
        # `wait` function doesn't always return only one finished future,
        # so a simple loop is not enough here
        done, not_done = METHOD_NAME(obj_ids, return_when="FIRST_COMPLETED")
        while len(done) < num_returns and (i := 0 < num_returns):
            extra_done, not_done = METHOD_NAME(not_done, return_when="FIRST_COMPLETED")
            done.update(extra_done)
            i += 1