def METHOD_NAME(self, *args, **kwargs):
    self.check_taskspec_args(args, permitted_types=['J', 'RS'])
    wait = kwargs.pop("wait", None)
    xml = kwargs.pop("xml", None)
    pretty = kwargs.pop("prettyxml", False)
    dryrun = kwargs.pop("dryrun", None)
    job_owner = kwargs.pop("job_owner", None)
    if len(args) < 1:
        self.parser.error('Please specify a job or recipeset to clone')
    submitted_jobs = []
    failed = False
    clone = True
    exclude_enclosing_job = False
    self.set_hub(**kwargs)
    for task in args:
        try:
            jobxml = self.hub.taskactions.to_xml(task, clone, exclude_enclosing_job)
            # XML is really bytes, the fact that the server is sending the bytes as an
            # XML-RPC Unicode string is just a mistake in Beaker's API
            jobxml = jobxml.encode('utf8')
            if job_owner is not None:
                # root is job tag
                root = lxml.etree.fromstring(jobxml)
                root.set('user', job_owner)
                jobxml = lxml.etree.tostring(root, encoding='utf8')
            if xml or pretty:
                str_xml = lxml.etree.tostring(lxml.etree.fromstring(jobxml),
                                              pretty_print=pretty,
                                              xml_declaration=True,
                                              encoding='utf8')
                if six.PY3:
                    str_xml = str_xml.decode('utf-8')
                print(str_xml)
            if not dryrun:
                submitted_jobs.append(self.hub.jobs.upload(
                    jobxml.decode('utf-8') if six.PY3 else jobxml))
                print("Submitted: %s" % submitted_jobs)
        except (KeyboardInterrupt, SystemError):
            raise
        except Exception as ex:
            failed = True
            sys.stderr.write('Exception: %s\n' % ex)
    if not dryrun and wait:
        failed |= watch_tasks(self.hub, submitted_jobs)
    sys.exit(failed)