yes, something like:
```
try:
  from django.utils.encoding import force_bytes as stringify
except ImportError:
  from django.utils.encoding import smart_str as stringify
```