def register(self, task_json=None, json_filename=None):
if not task_json and not json_filename:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>if task_json and json_filename:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>if json_filename:<EOL><INDENT>task_json = json.load(open(json_filename, '<STR_LIT:r>'))<EOL><DEDENT>r = self.gbdx_connection.post(self._base_url, json=task_json)<EOL>raise_for_status(r)<EOL>return r.text<EOL>
Registers a new GBDX task.

        Args:
            task_json (dict): Dictionary representing task definition.
            json_filename (str): A full path of a file with json representing the task definition.
            Only one out of task_json and json_filename should be provided.
        Returns:
            Response (str).