Use decorator to index sampling methods.