docs: def workflow(self,
                   workflow_name: Optional[str] = None,
                   use_default: bool = True) -> SoS_Workflow:
          '''Return a workflow with name_step+name_step specified in wf_name
          This function might be called recursively because of nested
          workflow.'''
          if workflow_name is None and not use_default:
              return SoS_Workflow(self.content, '', '', self.sections,
                                  self.global_stmts)
          allowed_steps = None
          if not workflow_name:
              wf_name = ''
          else:
              # if consists of multiple workflows
              if '+' in workflow_name:
                  wfs = []
                  for wf in workflow_name.split('+'):
                      if not SOS_SUBWORKFLOW.match(wf):
                          raise ValueError(
                              f'Incorrect workflow name {workflow_name}')
                      # if this is a combined workflow, extra_section might be specied.
                      wfs.append(self.workflow(wf))
                  combined_wf = wfs[0]
                  for wf in wfs[1:]:
                      combined_wf.extend(wf)
                  combined_wf.name = workflow_name
                  return combined_wf
              # if a single workflow
              # workflow_10:15 etc
              mo = SOS_SUBWORKFLOW.match(workflow_name)
              if not mo:
                  raise ValueError(f'Incorrect workflow name {workflow_name}')
              wf_name, allowed_steps = mo.group('name', 'steps')
          # check source
          if not wf_name:
              if len(self.workflows) == 1:
                  wf_name = list(self.workflows)[0]
              elif self.default_workflow:
                  wf_name = self.default_workflow
              elif 'default' in self.workflows or '' in self.workflows:
                  wf_name = 'default'
              else:
                  raise ValueError(
                      'Name of workflow should be specified because '
                      'the script defines more than one pipelines without a default one. '
                      'Available pipelines are: {}.'.format(', '.join(
                          self.workflows)))
          elif wf_name not in self.workflows and wf_name != 'default':
              raise ValueError(
                  f'Workflow {wf_name} is undefined. Available workflows are: {", ".join(self.workflows)}'
              )
  
          return SoS_Workflow(self.content, wf_name, allowed_steps, self.sections,
                              self.global_stmts)