@classmethod<EOL><INDENT>def build_pipeline_args(cls, project, script, job_params, task_params,<EOL>reserved_labels, preemptible, logging_uri, scopes,<EOL>keep_alive):<DEDENT>
<EOL>inputs = {}<EOL>inputs.update({SCRIPT_VARNAME: script})<EOL>inputs.update({<EOL>var.name: var.value<EOL>for var in job_params['<STR_LIT>'] | task_params['<STR_LIT>']<EOL>if var.value<EOL>})<EOL>inputs.update({<EOL>var.name: var.uri<EOL>for var in job_params['<STR_LIT>'] | task_params['<STR_LIT>']<EOL>if not var.recursive and var.value<EOL>})<EOL>outputs = {}<EOL>for var in job_params['<STR_LIT>'] | task_params['<STR_LIT>']:<EOL><INDENT>if var.recursive or not var.value:<EOL><INDENT>continue<EOL><DEDENT>if '<STR_LIT:*>' in var.uri.basename:<EOL><INDENT>outputs[var.name] = var.uri.path<EOL><DEDENT>else:<EOL><INDENT>outputs[var.name] = var.uri<EOL><DEDENT><DEDENT>labels = {}<EOL>labels.update({<EOL>label.name: label.value if label.value else '<STR_LIT>'<EOL>for label in (reserved_labels | job_params['<STR_LIT>']<EOL>| task_params['<STR_LIT>'])<EOL>})<EOL>args = {<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': project,<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': preemptible,<EOL>},<EOL>'<STR_LIT>': inputs,<EOL>'<STR_LIT>': outputs,<EOL>'<STR_LIT>': labels,<EOL>'<STR_LIT>': {<EOL>'<STR_LIT:email>': '<STR_LIT:default>',<EOL>'<STR_LIT>': scopes,<EOL>},<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': logging_uri<EOL>},<EOL>}<EOL>}<EOL>if keep_alive:<EOL><INDENT>args['<STR_LIT>'][<EOL>'<STR_LIT>'] = '<STR_LIT>' % keep_alive<EOL><DEDENT>return args<EOL>
Builds pipeline args for execution.

        Args:
          project: string name of project.
          script: Body of the script to execute.
          job_params: dictionary of values for labels, envs, inputs, and outputs
              for this job.
          task_params: dictionary of values for labels, envs, inputs, and outputs
              for this task.
          reserved_labels: dictionary of reserved labels (e.g. task-id,
              task-attempt)
          preemptible: use a preemptible VM for the job
          logging_uri: path for job logging output.
          scopes: list of scope.
          keep_alive: Seconds to keep VM alive on failure

        Returns:
          A nested dictionary with one entry under the key pipelineArgs containing
          the pipeline arguments.