code: def _decode(value):
          
          if value.isdigit():
              return int(value)
          if isinstance(value, bytes):
              return value.decode('utf-8')
          else:
              return value
docs: decode byte strings and convert to int where needed