code: def to_script(self, wf_name='wf'):
          
          self._closed()
  
          script = []
  
          # Workflow documentation
          # if self.documentation:
          #    if is_multiline(self.documentation):
          #        print('doc = """')
          #        print(self.documentation)
          #        print('"""')
          #        print('{}.set_documentation(doc)'.format(wf_name))
          #    else:
          #        print('{}.set_documentation(\'{}\')'.format(wf_name,
          #        self.documentation))
  
          # Workflow inputs
          params = []
          returns = []
          for name, typ in self.wf_inputs.items():
              params.append('{}=\'{}\''.format(name, typ))
              returns.append(name)
          script.append('{} = {}.add_inputs({})'.format(
              ', '.join(returns), wf_name, ', '.join(params)))
  
          # Workflow steps
          returns = []
          for name, step in self.wf_steps.items():
              pyname = step.python_name
              returns = ['{}_{}'.format(pyname, o) for o in step['out']]
              params = ['{}={}'.format(name, python_name(param))
                        for name, param in step['in'].items()]
              script.append('{} = {}.{}({})'.format(
                  ', '.join(returns), wf_name, pyname, ', '.join(params)))
  
          # Workflow outputs
          params = []
          for name, details in self.wf_outputs.items():
              params.append('{}={}'.format(
                  name, python_name(details['outputSource'])))
          script.append('{}.add_outputs({})'.format(wf_name, ', '.join(params)))
  
          return '\n'.join(script)
docs: Generated and print the scriptcwl script for the currunt workflow.
  
          Args:
              wf_name (str): string used for the WorkflowGenerator object in the
                  generated script (default: ``wf``).