def METHOD_NAME(X, shape, order="C", copy=None):
    """reshape(x, shape, order="C")
    Reshapes array `x` into new shape.
    Args:
        x (usm_ndarray):
            input array
        shape (tuple):
            the desired shape of the resulting array.
        order ({"C", "F"}, optional):
            memory layout of the resulting array
            if a copy is found to be necessary. Supported
            choices are `"C"` for C-contiguous, or row-major layout;
            and `"F"` for F-contiguous, or column-major layout.
    Returns:
        usm_ndarray:
            Reshaped array is a view, if possible,
            and a copy otherwise with memory layout as indicated
            by `order` keyword.
    """
    if not isinstance(X, dpt.usm_ndarray):
        raise TypeError
    if not isinstance(shape, (list, tuple)):
        shape = (shape,)
    if order in "cfCF":
        order = order.upper()
    else:
        raise ValueError(
            f"Keyword 'order' not recognized. Expecting 'C' or 'F', got {order}"
        )
    if copy not in (True, False, None):
        raise ValueError(
            f"Keyword 'copy' not recognized. Expecting True, False, "
            f"or None, got {copy}"
        )
    shape = [operator.index(d) for d in shape]
    negative_ones_count = 0
    for nshi in shape:
        if nshi == -1:
            negative_ones_count = negative_ones_count + 1
        if (nshi < -1) or negative_ones_count > 1:
            raise ValueError(
                "Target shape should have at most 1 negative "
                "value which can only be -1"
            )
    if negative_ones_count:
        sz = -np.prod(shape)
        if sz == 0:
            raise ValueError(
                f"Can not reshape array of size {X.size} into "
                f"shape {tuple(i for i in shape if i >= 0)}"
            )
        v = X.size // sz
        shape = [v if d == -1 else d for d in shape]
    if X.size != np.prod(shape):
        raise ValueError(f"Can not reshape into {shape}")
    if X.size:
        newsts = reshaped_strides(X.shape, X.strides, shape, order=order)
    else:
        newsts = (1,) * len(shape)
    copy_required = newsts is None
    if copy_required and (copy is False):
        raise ValueError(
            "Reshaping the array requires a copy, but no copying was "
            "requested by using copy=False"
        )
    if copy_required or (copy is True):
        # must perform a copy
        flat_res = dpt.usm_ndarray(
            (X.size,),
            dtype=X.dtype,
            buffer=X.usm_type,
            buffer_ctor_kwargs={"queue": X.sycl_queue},
        )
        if order == "C":
            hev, _ = _copy_usm_ndarray_for_reshape(
                src=X, dst=flat_res, shift=0, sycl_queue=X.sycl_queue
            )
            hev.wait()
        else:
            for i in range(X.size):
                _copy_from_usm_ndarray_to_usm_ndarray(
                    flat_res[i], X[np.unravel_index(i, X.shape, order=order)]
                )
        return dpt.usm_ndarray(
            tuple(shape), dtype=X.dtype, buffer=flat_res, order=order
        )
    # can form a view
    return dpt.usm_ndarray(
        shape,
        dtype=X.dtype,
        buffer=X,
        strides=tuple(newsts),
        offset=X.__sycl_usm_array_interface__.get("offset", 0),
    )