import six
from graphql.core.type import GraphQLUnionType

from .base import FieldsClassType, FieldsClassTypeMeta, FieldsOptions


class UnionTypeOptions(FieldsOptions):

    def __init__(self, *args, **kwargs):
        super(UnionTypeOptions, self).__init__(*args, **kwargs)
        self.types = []


class UnionTypeMeta(FieldsClassTypeMeta):
    options_class = UnionTypeOptions

    def get_options(cls, meta):
        return cls.options_class(meta, types=[])


class UnionType(six.with_metaclass(UnionTypeMeta, FieldsClassType)):

    class Meta:
        abstract = True

    @classmethod
    def _resolve_type(cls, schema, instance, *args):
        return schema.T(instance.__class__)

    @classmethod
    def internal_type(cls, schema):
        if cls._meta.abstract:
            raise Exception("Abstract ObjectTypes don't have a specific type.")

        return GraphQLUnionType(
            cls._meta.type_name,
            types=list(map(schema.T, cls._meta.types)),
            resolve_type=lambda instance, info: cls._resolve_type(schema, instance, info),
            description=cls._meta.description,
        )

@@ -1,12 +1,43 @@
+from functools import partial%0A%0A
 import six%0Af
@@ -1031,31 +1031,16 @@
 ype=
-lambda instance, info: 
+partial(
 cls.
@@ -1056,31 +1056,16 @@
 type
-(
+, 
 schema
-, instance, info
 ),%0A 

Update to use partial instead of lambda function