code: def get_octal(self, c, i):
          
  
          index = i.index
          value = []
          zero_count = 0
          try:
              if c == '0':
                  for x in range(3):
                      if c != '0':
                          break
                      value.append(c)
                      c = next(i)
              zero_count = len(value)
              if zero_count < 3:
                  for x in range(3 - zero_count):
                      if c not in _OCTAL:
                          break
                      value.append(c)
                      c = next(i)
              i.rewind(1)
          except StopIteration:
              pass
  
          octal_count = len(value)
          if not (self.use_format and octal_count) and not (zero_count and octal_count < 3) and octal_count != 3:
              i.rewind(i.index - index)
              value = []
  
          return ''.join(value) if value else None
docs: Get octal.