can get lazy tensor slicing code dynamically and import it as a function