code: def get_thread_id(self):
          
          if self._id is None:
              for thread_id, obj in list(threading._active.items()):
                  if obj is self:
                      self._id = thread_id
          return self._id
docs: Return thread id