code: def _zero_based_index(self, onebased: Union[int, str]) -> int:
          
          result = int(onebased)
          if result > 0:
              result -= 1
          return result
docs: Convert a one-based index to a zero-based index.