code: def predict(self, data, schema=None, endpoint=None):
          
          from .. import Projects
  
          if endpoint is not None:
              self._endpoint = endpoint
          if self._predict_rest is None:
              # do not add project option
              self._predict_rest = RestClient(self._client.account, self._endpoint, proxy=options.data_proxy)
  
          json_data = json.dumps(self._build_predict_request(data, schema))
          headers = {'Content-Type': 'application/json'}
  
          predict_model = Projects(client=self._predict_rest)[self.project.name].online_models[self.name]
          resp = self._predict_rest.post(predict_model.resource(), json_data, headers=headers)
  
          if not self._client.is_ok(resp):
              e = errors.ODPSError.parse(resp)
              raise e
          return ModelPredictResults.parse(resp).outputs
docs: Predict data labels with current online model.
  
          :param data: data to be predicted
          :param schema: schema of input data
          :param endpoint: endpoint of predict service
          :return: prediction result