<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def types(self) -> GraphQLTypeList: """Get provided types."""

        try:
            types = resolve_thunk(self._types)
        except GraphQLError:
            raise
        except Exception as error:
            raise TypeError(f"{self.name} types cannot be resolved: {error}")
        if types is None:
            types = []
        if not isinstance(types, (list, tuple)):
            raise TypeError(
                f"{self.name} types must be a list/tuple"
                " or a function which returns a list/tuple."
            )
        if not all(isinstance(value, GraphQLObjectType) for value in types):
            raise TypeError(f"{self.name} types must be GraphQLObjectType objects.")
        return types[:]