text: Find errors in the following code
  import re
  all_dashboard_rules = []
  for name in dashboard_rules:
      rules = dashboard_rules[name]
      for rule in rules:
          match = re.search(r"ranking_platform(:|_)[*a-zA-Z-_]*|baseplate[:a-zA-Z-_]*|graphql[:a-zA-Z-_]*|thriftbp[:a-zA-Z-_]*|grpc_server[:a-zA-Z-_]*|http_server[:a-zA-Z-_]*", rule)
          if match:
              metric = match.group(0)
              metric = metric.replace(':', '_')
          all_dashboard_rules.append(metric)