code: def to_det_oid(self, det_id_or_det_oid):
          
          try:
              int(det_id_or_det_oid)
          except ValueError:
              return det_id_or_det_oid
          else:
              return self.get_det_oid(det_id_or_det_oid)
docs: Convert det OID or ID to det OID