<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(self, name_or_index):
 """Locate a dataset. Args:: name_or_index dataset name or index number Returns:: SDS instance for the dataset C library equivalent : SDselect """


        if isinstance(name_or_index, type(1)):
            idx = name_or_index
        else:
            try:
                idx = self.nametoindex(name_or_index)
            except HDF4Error:
                raise HDF4Error("select: non-existent dataset")
        id = _C.SDselect(self._id, idx)
        _checkErr('select', id, "cannot execute")
        return SDS(self, id)