docstr: test the combination of unflushed pending + lazy loaded from DB.
docstr_tok: ["test","the","combination","of","unflushed","pending","+","lazy","loaded","from","DB","."]
code: def test_pending_combines_with_flushed(self):
      """test the combination of unflushed pending + lazy loaded from DB."""
  
      Item, Keyword = (self.classes.Item, self.classes.Keyword)
  
      session = Session(testing.db, autoflush=False)
  
      k1 = Keyword(name="k1")
      k2 = Keyword(name="k2")
      i1 = Item(description="i1", keywords=[k1])
      session.add(i1)
      session.add(k2)
      session.commit()
  
      k2.items.append(i1)
      # the pending
      # list is still here.
      eq_(
          set(
              attributes.instance_state(i1)
              ._pending_mutations["keywords"]
              .added_items
          ),
          {k2},
      )
      # because autoflush is off, k2 is still
      # coming in from pending
      eq_(i1.keywords, [k1, k2])
  
      # prove it didn't flush
      eq_(session.scalar(text("select count(*) from item_keywords")), 1)
  
      # the pending collection was removed
      assert (
          "keywords"
          not in attributes.instance_state(i1)._pending_mutations
      )
  
imports: from sqlalchemy import testing
  from sqlalchemy import text
  from sqlalchemy.orm import attributes
  from sqlalchemy.orm import backref
  from sqlalchemy.orm import relationship
  from sqlalchemy.orm import Session
  from sqlalchemy.testing import eq_
  from sqlalchemy.testing import is_
  from sqlalchemy.testing.fixtures import fixture_session
  from test.orm import _fixtures
label_desc: Use image node_id 4 for calling the M2MCollectionMoveTest obj's underlying member method code with example usage: obj.test_pending_combines_with_flushed() without return types