def __init__(self, parent, base_uri, definition):
        class_name = self.__class__.__name__
        if class_name not in no_resource_id_required and self.resource_id not in definition:
            raise MissingResourceId(
                "Resource {0} requires attribute '{1}' for initialization".format(
                    self.__class__.__name__, self.resource_id))

        if definition == "":
            logging.error('Empty response received for ' + base_uri + "")
            return

        try:
            definition = helpers.uncamelize(definition)
        except:
            logging.error('Invalid response received for ' + base_uri + "")
            return

        self.parent = parent

        self.api_version = parent.api_version if hasattr(parent, "api_version") else "2.0"

        self._set_instance_attributes(parent, definition)

        unidict = {six.text_type(k): six.text_type(v) for k, v in definition.items()}
        self.base_uri = quote(base_uri.format(**unidict))
dataset/ETHPy150Open contextio/Python-ContextIO/contextio/lib/resources/base_resource.py/BaseResource.__init__/original