def _generate_id(self):
        # This code is mostly borrowed from SessionBase._get_new_session_key()

        # The random module is seeded when this Apache child is created.
        # Use settings.SECRET_KEY as added salt.
        try:
            pid = os.getpid()
        except __HOLE__:
            # No getpid() in Jython, for example
            pid = 1

        md5 = hashlib.md5()
        md5.update('%s%s%s%s' % (
            randrange(0, MAX_ANONYMOUS_ID),
            pid, time.time(), settings.SECRET_KEY))
        return md5.hexdigest()
dataset/ETHPy150Open mozilla/kitsune/kitsune/sumo/anonymous.py/AnonymousIdentity._generate_id