<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_auto_rank(self, rank):
 """Tries to figure out what rank we should use for analyses"""


        if rank == "auto":
            # if we're an accessor for a ClassificationsDataFrame, use its _rank property
            if self.__class__.__name__ == "OneCodexAccessor":
                return self._rank

            if self._field == "abundance":
                return "species"
            else:
                return "genus"
        else:
            return rank