def METHOD_NAME(hide_all, expose_all, hide, expose, hide_types, expose_types):
    # first, some sanity checks:
    # hide_all and expose_all intersect?
    assert (hide_all is False and expose_all is False) or (
        hide_all != expose_all
    ), "cannot hide and expose a site"
    # hide and expose intersect?
    if hide is None:
        hide = []
    else:
        hide_all = False
    if expose is None:
        expose = []
    else:
        hide_all = True
    assert set(hide).isdisjoint(set(expose)), "cannot hide and expose a site"
    # hide_types and expose_types intersect?
    if hide_types is None:
        hide_types = []
    else:
        hide_all = False
    if expose_types is None:
        expose_types = []
    else:
        hide_all = True
    assert set(hide_types).isdisjoint(
        set(expose_types)
    ), "cannot hide and expose a site type"
    return partial(_block_fn, expose, expose_types, hide, hide_types, hide_all)