def _preprocess_data(self, content_type, blob_file,
                       filename, base64_encoding):
    if base64_encoding:
      blob_file = cStringIO.StringIO(base64.urlsafe_b64decode(blob_file.read()))

    # If content_type or filename are bytes, assume UTF-8 encoding.
    try:
      if not isinstance(content_type, unicode):
        content_type = content_type.decode('utf-8')
      if filename and not isinstance(filename, unicode):
        filename = filename.decode('utf-8')
    except UnicodeDecodeError:
      raise _InvalidMetadataError(
          'The uploaded entity contained invalid UTF-8 metadata. This may be '
          'because the page containing the upload form was served with a '
          'charset other than "utf-8".')
    return content_type, blob_file, filename
Check that y_true and y_pred belong to the same regression task
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/blob_upload.py/Application._preprocess_data--crossover with--dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/metrics/regression.py/_check_reg_targets