def decode_uid(pk):
    try:
        from django.utils.http import urlsafe_base64_decode
        from django.utils.encoding import force_text
        return force_text(urlsafe_base64_decode(pk))
    except __HOLE__:
        from django.utils.http import base36_to_int
        return base36_to_int(pk)
dataset/ETHPy150Open sunscrapers/djoser/djoser/utils.py/decode_uid