code: def test_query_three(self):
      ua = aliased(User)
      q = (
          Session.query(ua)
          .join(ua.addresses)
          .filter(Address.email.like("%fred%"))
      )
      for prot in pickle_protocols():
          q2 = serializer.loads(
              serializer.dumps(q, prot), users.metadata, Session
          )
          eq_(q2.all(), [User(name="fred")])
  
          # try to pull out the aliased entity here...
          ua_2 = q2._compile_state()._entities[0].entity_zero.entity
          eq_(list(q2.with_entities(ua_2.id, ua_2.name)), [(9, "fred")])
  
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 11 for calling the SerializeTest obj's underlying member method code with example usage: obj.test_query_three() without return types