code: def validate_ignore_reuse(stages, ignore_reuse_stages):
      
      if not isinstance(ignore_reuse_stages, list):
           raise WorkflowBuilderException('"IgnoreReuse must be a list of strings - stage IDs or "*"')
  
      ignore_reuse_set = set(ignore_reuse_stages)
      if '*' in ignore_reuse_set and ignore_reuse_set == 1:
          return
  
      stage_ids = set([stage.get('id') for stage in stages])
      for ignored in ignore_reuse_set:
          if ignored not in stage_ids:
              raise WorkflowBuilderException(
                  'Stage with ID {} not found. Add a matching "id" for the stage you wish to set ignoreReuse for'.format(ignored))
docs: Checks if each stage ID specified in ignore_reuse_stages exists in
      the workflow definition. If ignore_reuse_stages contains
      only '*', the field is valid.