def METHOD_NAME(dim):
    """Test the Domain.__contains__ method. Failure here would signify that the
    method is not working as intended.
    """
    if dim == 2:
        domain = pp.Domain(bounding_box={"xmin": 0, "xmax": 1, "ymin": 0, "ymax": 1})
        # Generate points inside the domain, on the boundary (both sides), and strictly
        # outside.
        points = [
            np.array([0.5, 0.5]),
            np.array([0, 0.5]),
            np.array([1, 0.5]),
            np.array([0.5, 0]),
            np.array([0.5, 1]),
            np.array([-0.5, 0.5]),
            np.array([1.5, 0.5]),
            np.array([0.5, -0.5]),
            np.array([0.5, 1.5]),
        ]
        is_in = [True, True, True, True, True, False, False, False, False]
    else:  # dimension is 3
        domain = pp.Domain(
            bounding_box={
                "xmin": 0,
                "xmax": 1,
                "ymin": 0,
                "ymax": 1,
                "zmin": 0,
                "zmax": 1,
            }
        )
        # Generate points inside the domain, on the boundary (both sides), and strictly
        # outside.
        points = [
            np.array([0.5, 0.5, 0.5]),
            np.array([0, 0.5, 0.5]),
            np.array([1, 0.5, 0.5]),
            np.array([0.5, 0, 0.5]),
            np.array([0.5, 1, 0.5]),
            np.array([0.5, 0.5, 0]),
            np.array([0.5, 0.5, 1]),
            np.array([-0.5, 0.5, 0.5]),
            np.array([1.5, 0.5, 0.5]),
            np.array([0.5, -0.5, 0.5]),
            np.array([0.5, 1.5, 0.5]),
            np.array([0.5, 0.5, -0.5]),
            np.array([0.5, 0.5, 1.5]),
        ]
        is_in = [
            True,
            True,
            True,
            True,
            True,
            True,
            True,
            False,
            False,
            False,
            False,
            False,
            False,
        ]
    for p, i in zip(points, is_in):
        assert (p in domain) == i