def METHOD_NAME(self, typingctx, other):
    """
    Unify this with the *other* USMNdArray.
    """
    # If other is array and the ndim, usm_type, address_space, and device
    # attributes match
    if (
        isinstance(other, USMNdArray)
        and other.ndim == self.ndim
        and self.device == other.device
        and self.addrspace == other.addrspace
        and self.usm_type == other.usm_type
    ):
        # If dtype matches or other.dtype is undefined (inferred)
        if other.dtype == self.dtype or not other.dtype.is_precise():
            if self.layout == other.layout:
                layout = self.layout
            else:
                layout = "A"
            readonly = not (self.mutable and other.mutable)
            aligned = self.aligned and other.aligned
            return type(self)(
                dtype=self.dtype,
                ndim=self.ndim,
                layout=layout,
                readonly=readonly,
                aligned=aligned,
                usm_type=self.usm_type,
                device=self.device,
                addrspace=self.addrspace,
            )