def as_machine(self):
        """Convert to a `Machine` object.

        `node_type` must be `NodeType.MACHINE`.
        """
        if self.node_type != NodeType.MACHINE:
            raise ValueError(
                'Cannot convert to `Machine`, node_type is not a machine.')
        return self._origin.Machine(self._data)
Convert to a `Machine` object.

        `node_type` must be `NodeType.MACHINE`.