# Path: cma-es/batchcompute_python_sdk/src/batchcompute/utils/constants.py
# ENDPOINT_INFO = {
#     'cn-qingdao': 'batchcompute.cn-qingdao.aliyuncs.com',
#     'cn-hangzhou': 'batchcompute.aliyuncs.com',
#     'cn-shenzhen': 'batchcompute.cn-shenzhen.aliyuncs.com'
# }
# 
# STRING = (str, unicode)
# 
# PY2 = sys.version_info[0] == 2
# 
# PY3 = sys.version_info[0] == 3


import time
import datetime
import urllib
import itertools
        import json
        import simplejson as json
        import httplib
        import http.client as httplib
from hashlib import md5
from .constants import (ENDPOINT_INFO, STRING, PY2, PY3)


class ConfigError(Exception):
    def __init__(self, msg):
        super(ConfigError, self).__init__()
        self._msg = msg

    def __str__(self):
        return self._msg


def import_json():
    try:
    except ImportError:
    return json


def import_httplib():
    try:
    except ImportError:
    return httplib


def str_md5(s):
    s = md5(str(s).encode('utf-8')).hexdigest()
    return s


def utf8(s):
    if not isinstance(s, str):

# Path: cma-es/batchcompute_python_sdk/src/batchcompute/utils/constants.py
# ENDPOINT_INFO = {
#     'cn-qingdao': 'batchcompute.cn-qingdao.aliyuncs.com',
#     'cn-hangzhou': 'batchcompute.aliyuncs.com',
#     'cn-shenzhen': 'batchcompute.cn-shenzhen.aliyuncs.com'
# }
# 
# STRING = (str, unicode)
# 
# PY2 = sys.version_info[0] == 2
# 
# PY3 = sys.version_info[0] == 3


# Path: cma-es/batchcompute_python_sdk/src/batchcompute/utils/functions.py
import time
import datetime
import urllib
import itertools
        import json
        import simplejson as json
        import httplib
        import http.client as httplib
from hashlib import md5
from .constants import (ENDPOINT_INFO, STRING, PY2, PY3)



class ConfigError(Exception):
    def __init__(self, msg):
        super(ConfigError, self).__init__()
        self._msg = msg

    def __str__(self):
        return self._msg


def import_json():
    try:
    except ImportError:
    return json


def import_httplib():
    try:
    except ImportError:
    return httplib


def str_md5(s):
    s = md5(str(s).encode('utf-8')).hexdigest()
    return s


def utf8(s):
    if not isinstance(s, str):

        s = s.encode('utf-8')