def _random(cls):
        """Generate a 5-byte random number once per process.
        """
        pid = os.getpid()
        if pid != cls._pid:
            cls._pid = pid
            cls.__random = _random_bytes()
        return cls.__random
Generate a 5-byte random number once per process.
        
stackoverflow/venv/lib/python3.6/site-packages/bson/objectid.py