code: def test_query_one(self):
      q = (
          Session.query(User)
          .filter(User.name == "ed")
          .options(joinedload(User.addresses))
      )
  
      q2 = serializer.loads(
          serializer.dumps(q, -1), users.metadata, Session
      )
  
      def go():
          eq_(
              q2.all(),
              [
                  User(
                      name="ed",
                      addresses=[
                          Address(id=2),
                          Address(id=3),
                          Address(id=4),
                      ],
                  )
              ],
          )
  
      self.assert_sql_count(testing.db, go, 1)
  
      eq_(
          q2.join(User.addresses)
          .filter(Address.email == "ed@bettyboop.com")
          .enable_eagerloads(False)
          .with_entities(func.count(literal_column("*")))
          .scalar(),
          1,
      )
      u1 = Session.get(User, 8)
      q = (
          Session.query(Address)
          .filter(Address.user == u1)
          .order_by(desc(Address.email))
      )
      q2 = serializer.loads(
          serializer.dumps(q, -1), users.metadata, Session
      )
      eq_(
          q2.all(),
          [
              Address(email="ed@wood.com"),
              Address(email="ed@lala.com"),
              Address(email="ed@bettyboop.com"),
          ],
      )
  
imports: from sqlalchemy import desc
  from sqlalchemy import ForeignKey
  from sqlalchemy import func
  from sqlalchemy import Integer
  from sqlalchemy import join
  from sqlalchemy import literal_column
  from sqlalchemy import MetaData
  from sqlalchemy import select
  from sqlalchemy import String
  from sqlalchemy import testing
  from sqlalchemy.ext import serializer
  from sqlalchemy.orm import aliased
  from sqlalchemy.orm import class_mapper
  from sqlalchemy.orm import column_property
  from sqlalchemy.orm import configure_mappers
  from sqlalchemy.orm import joinedload
  from sqlalchemy.orm import relationship
  from sqlalchemy.orm import scoped_session
  from sqlalchemy.orm import sessionmaker
  from sqlalchemy.testing import AssertsCompiledSQL
  from sqlalchemy.testing import eq_
  from sqlalchemy.testing import fixtures
  from sqlalchemy.testing.entities import ComparableEntity
  from sqlalchemy.testing.schema import Column
  from sqlalchemy.testing.schema import Table
label_desc: Use image node_id 9 for calling the SerializeTest obj's underlying member method code with example usage: obj.test_query_one() without return types