'Reinterpret the resource definition in the context of a new stack.
This returns a new resource definition, with all of the functions
parsed in the context of the specified stack and template.'

def reparse(self, stack, template):

    assert (not getattr(self, '_frozen', False)), 'Cannot    re-parse    a    frozen    definition'
    def reparse_snippet(snippet):
        return template.parse(stack, copy.deepcopy(snippet))
    return type(self)(self.name, self.resource_type, properties=reparse_snippet(self._properties), metadata=reparse_snippet(self._metadata), depends=reparse_snippet(self._depends), deletion_policy=reparse_snippet(self._deletion_policy), update_policy=reparse_snippet(self._update_policy), external_id=reparse_snippet(self._external_id), condition=self._condition)
