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