def _unexpected_primitive(p: core.Primitive, *args, **kwargs):
    assert False, f'Encountered unexpected primitive {p}'
def _unexpected_primitive(p: core.Primitive, *args, **kwargs):
    assert False, f'Encountered unexpected primitive {p}'