code: def rerun_github_actions(self) -> None:
      workflow_ids = []
      for item in self.head_commit()["statusCheckRollup"]["contexts"][
          "nodes"
      ]:
          if "checkSuite" in item and item["conclusion"] == "FAILURE":
              workflow_id = item["checkSuite"]["workflowRun"][
                  "databaseId"
              ]
              workflow_ids.append(workflow_id)
  
      workflow_ids = list(set(workflow_ids))
      logging.info(
          f"Rerunning GitHub Actions workflows with IDs: {workflow_ids}"
      )
      if self.dry_run:
          actions_github = None
      else:
          actions_github = GitHubRepo(
              user=self.github.user,
              repo=self.github.repo,
              token=GH_ACTIONS_TOKEN,
          )
      for workflow_id in workflow_ids:
          if self.dry_run:
              logging.info(
                  f"Dry run, not restarting workflow {workflow_id}"
              )
          else:
              try:
                  actions_github.post(
                      f"actions/runs/{workflow_id}/rerun-failed-jobs",
                      data={},
                  )
              except RuntimeError as e:
                  logging.exception(e)
                  # Ignore errors about jobs that are part of the same workflow to avoid
                  # having to figure out which jobs are in which workflows ahead of time
                  if (
                      "The workflow run containing this job is already running"
                      in str(e)
                  ):
                      pass
                  else:
                      raise e
  
imports: import os
  import json
  import argparse
  import sys
  import warnings
  import logging
  import traceback
  import re
  from typing import Dict, Any, List, Optional, Callable, Union
  from pathlib import Path
  from git_utils import git, GitHubRepo, parse_remote, post
  from cmd_utils import init_log
label_desc: Use image node_id 25 for calling the PR obj's underlying member method code with example usage: obj.rerun_github_actions() without return types