code: def _load_id_or_insert(self, session):
          
          if self.id is None:
              stable_id = self.get_stable_id()
              # Check if exists
              id = session.execute(
                  select([Context.id]).where(Context.stable_id == stable_id)
              ).first()
  
              # If not, insert
              if id is None:
                  self.id = session.execute(
                      Context.__table__.insert(),
                      {"type": self._get_table().__tablename__, "stable_id": stable_id},
                  ).inserted_primary_key[0]
                  insert_args = self._get_insert_args()
                  insert_args["id"] = self.id
                  return insert_args
              else:
                  self.id = id[0]
docs: Load the id of the temporary context if it exists or return insert args.
  
          As a side effect, this also inserts the Context object for the stableid.
  
          :return: The record of the temporary context to insert.
          :rtype: dict