def METHOD_NAME(self, threshold=None):
    idx = self.mesh.ds.boundary_edge_index()
    if threshold is not None:
        bc = self.mesh.entity_barycenter('face', index=idx)
        flag = threshold(bc)
        idx  = idx[flag]
    gdof = self.number_of_global_dofs()
    edge2dof = self.edge_to_dof()
    isBdDof = np.zeros(gdof, dtype=np.bool)
    isBdDof[edge2dof[idx]] = True
    return isBdDof