def METHOD_NAME(self, squeeze_dims, inplace, gc, dc):
    shape = [
        1 if dim in squeeze_dims else np.random.randint(1, 5)
        for dim in range(4)
    ]
    X = np.random.rand(*shape).astype(np.float32)
    op = core.CreateOperator(
        "Squeeze", "X", "X" if inplace else "Y", dims=squeeze_dims
    )
    self.assertDeviceChecks(dc, op, [X], [0])