def METHOD_NAME(self, node, options=None):
    '''Ensure that it is valid to apply this transformation to the
    supplied node.
    :param node: the node to validate.
    :type node: :py:class:`psyclone.psyir.nodes.Routine`
    :param options: a dictionary with options for transformations.
    :type options: Optional[Dict[str, Any]]
    :raises TransformationError: if the node is not a Routine.
    '''
    if not isinstance(node, Routine):
        raise TransformationError(
            f"Error in {self.name} transformation. This transformation "
            f"can only be applied to 'Routine' nodes, but found "
            f"'{type(node).__name__}'.")