def test_get_bind_custom_session_subclass(self, style):
        """test #6285"""

        class MySession(Session):
            if style == "style1":

                def get_bind(self, mapper=None, **kwargs):
                    return super().get_bind(mapper=mapper, **kwargs)

            elif style == "style2":
                # this was the workaround for #6285, ensure it continues
                # working as well
                def get_bind(self, mapper=None, *args, **kwargs):
                    return super().get_bind(mapper, *args, **kwargs)

            elif style == "style3":
                # py2k style
                def get_bind(self, mapper=None, *args, **kwargs):
                    return super(MySession, self).get_bind(
                        mapper, *args, **kwargs
                    )

            elif style == "style4":
                # py2k style
                def get_bind(self, mapper=None, **kwargs):
                    return super(MySession, self).get_bind(
                        mapper=mapper, **kwargs
                    )

        s1 = MySession(testing.db)
        is_(s1.get_bind(), testing.db)

        ss = scoped_session(sessionmaker(testing.db, class_=MySession))

        is_(ss.get_bind(), testing.db)