<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reftoindex(self, sds_ref):
 """Returns the index number of a dataset given the dataset reference number. Args:: sds_ref : dataset reference number Returns:: dataset index number C library equivalent : SDreftoindex """


        sds_idx = _C.SDreftoindex(self._id, sds_ref)
        _checkErr('reftoindex', sds_idx, 'illegal SDS ref number')
        return sds_idx