Constructing integrals on subdomains in dolfinx

Hi everyone!
I am trying to use the Nitsche’s method to add boundaries to the weak form of DG element, so I must know how to define an integral on a given surface. For example, on a unit mesh [0,1] × [0,1]×[0,1], only integrate on the right outer boundary(y=1).

import numpy as np
import ufl
from dolfinx import cpp as _cpp
from dolfinx import fem
from dolfinx.fem import (Constant, Function, FunctionSpace, dirichletbc,
                         extract_function_spaces, form,
                         locate_dofs_geometrical, locate_dofs_topological)
from dolfinx.io import XDMFFile
from dolfinx.mesh import (CellType, GhostMode, create_rectangle,
                          locate_entities_boundary,create_unit_cube)
from ufl import div, dx, grad, inner,dot,outer,ds,dS,avg,jump,rot,cross
from mpi4py import MPI
from petsc4py import PETSc as _PETSc
# Create mesh
msh = create_unit_cube(MPI.COMM_WORLD,
                       8,8,8,
                       CellType.tetrahedron, GhostMode.none)

Many Thanks!

See, e.g., Setting multiple Dirichlet, Neumann, and Robin conditions — FEniCSx tutorial.

Specifically see the creation of a ufl.Measure object.