def _get_resource_type_cls(self, name, resource):
        """Attempts to return troposphere class that represents Type of
        provided resource. Attempts to find the troposphere class who's
        `resource_type` field is the same as the provided resources `Type`
        field.

        :param resource: Resource to find troposphere class for
        :return: None: If no class found for provided resource
                 type: Type of provided resource
        :raise ResourceTypeNotDefined:
                  Provided resource does not have a `Type` field
        """
        # If provided resource does not have `Type` field
        if 'Type' not in resource:
            raise ResourceTypeNotDefined(name)

        # Attempt to find troposphere resource with:
        #   `resource_type` == resource['Type']
        try:
            return self.inspect_resources[resource['Type']]
        except KeyError:
            # is there a custom mapping?
            for custom_member in self._custom_members:
                if custom_member.resource_type == resource['Type']:
                    return custom_member
            # If no resource with `resource_type` == resource['Type'] found
            return None