code: def as_region_controller(self):
          
          if self.node_type not in [
                  NodeType.REGION_CONTROLLER,
                  NodeType.REGION_AND_RACK_CONTROLLER]:
              raise ValueError(
                  'Cannot convert to `RegionController`, node_type is not a '
                  'region controller.')
          return self._origin.RegionController(self._data)
docs: Convert to a `RegionController` object.
  
          `node_type` must be `NodeType.REGION_CONTROLLER` or
          `NodeType.REGION_AND_RACK_CONTROLLER`.