def METHOD_NAME(self, ctype):
    assert ctype in self.compose_types, \
        BaseImage.ImageError("Bad compose type '%s': must be one of %s" % (
            ctype, str(self.compose_types)))
    self.compose = ctype
    self.compose_layers()