def METHOD_NAME(name):
    """Get all physical groups matching name.
    """
    groups = {}
    dimTags = gmsh.model.get_physical_groups()
    for dim, tag in dimTags:
        if gmsh.model.get_physical_name(dim, tag) == name:
            groups[dim] = tag
    if len(groups) == 0:
        raise ValueError(f"Could not find physical group '{name}'.")
    return groups