'Generate a new value for this ObjectId.'

def __generate(self):

    oid = struct.pack('>i', int(time.time()))
    oid += ObjectId._machine_bytes
    oid += struct.pack('>H', (os.getpid() % 65535))
    with ObjectId._inc_lock:
        oid += struct.pack('>i', ObjectId._inc)[1:4]
        ObjectId._inc = ((ObjectId._inc + 1) % 16777215)
    self.__id = oid
