code: def morphTo(self, region):
          
          if not region or not isinstance(region, Region):
              raise TypeError("morphTo expected a Region object")
          self.setROI(region)
          return self
docs: Change shape of this region to match the given ``Region`` object