<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _select_file_guard(datasource_method):
 """ in case we call _select_file multiple times with the same value, we do not want to reopen file handles."""

        from functools import wraps
        @wraps(datasource_method)
        def wrapper(self, itraj):
            # itraj already selected, we're done.
            if itraj == self._selected_itraj:
                return
            datasource_method(self, itraj)
            self._itraj = self._selected_itraj = itraj
        return wrapper