code: def _update_workflow_definition(pb_config: dict):
          
          known_workflows = get_workflows()
          workflow_id = pb_config['workflow']['id']
          workflow_version = pb_config['workflow']['version']
          if workflow_id not in known_workflows or \
             workflow_version not in known_workflows[workflow_id]:
              raise RuntimeError("Unknown workflow definition: {}:{}"
                                 .format(workflow_id, workflow_version))
          workflow = get_workflow(workflow_id, workflow_version)
          for stage in workflow['stages']:
              stage['status'] = 'none'
          pb_config['workflow_parameters'] = pb_config['workflow']['parameters']
          pb_config['workflow_id'] = pb_config['workflow']['id']
          pb_config['workflow_version'] = pb_config['workflow']['version']
          pb_config['workflow_stages'] = workflow['stages']
          pb_config.pop('workflow', None)
docs: Update the PB configuration workflow definition.
  
          Args:
              pb_config (dict): PB configuration dictionary
  
          Raises:
              RunTimeError, if the workflow definition (id, version)
              specified in the sbi_config is not known.