def METHOD_NAME():
    @op
    def my_table_materialization():
        yield AssetMaterialization("my_table")
        yield Output(1)
    @job
    def my_table_job():
        my_table_materialization()
    @asset_sensor(asset_key=AssetKey("my_table"), job=do_something_job)
    def my_asset_sensor(context, asset_event):
        return SensorResult([RunRequest("foo")])
    @asset_sensor(asset_key=AssetKey("my_table"), job=do_something_job)
    def asset_sensor_set_cursor(context, asset_event):
        return SensorResult([RunRequest("foo")], cursor="foo")
    with instance_for_test() as instance:
        my_table_job.execute_in_process(instance=instance)
        with build_sensor_context(
            instance=instance,
        ) as ctx:
            result = my_asset_sensor.evaluate_tick(ctx)
            assert len(result.run_requests) == 1
            assert result.run_requests[0].run_key == "foo"
        with build_sensor_context(
            instance=instance,
        ) as ctx:
            with pytest.raises(
                DagsterInvariantViolationError, match="The cursor is managed by the asset sensor"
            ):
                asset_sensor_set_cursor.evaluate_tick(ctx)