code: def assert_sets_equal(
      set1: set[str],
      set_name_1: str,
      set2: set[str],
      set_name_2: str,
      allow_extra_in_set2=False,
      extra_message: str = "",
  ):
      try:
          difference1 = set1.difference(set2)
      except TypeError as e:
          raise AssertionError(
              f"invalid type when attempting set difference: {e}"
          )
      except AttributeError as e:
          raise AssertionError(
              f"first argument does not support set difference: {e}"
          )
  
      try:
          difference2 = set2.difference(set1)
      except TypeError as e:
          raise AssertionError(
              f"invalid type when attempting set difference: {e}"
          )
      except AttributeError as e:
          raise AssertionError(
              f"second argument does not support set difference: {e}"
          )
  
      if difference1 or (difference2 and not allow_extra_in_set2):
          lines = []
          lines.append(f" Left set:{set_name_1}")
          lines.append(f" Right set:{set_name_2}")
          if difference1:
              lines.append(
                  "    Items in the left set but not the right:"
              )
              for item in sorted(difference1):
                  lines.append(f"       {item!r}")
          if difference2 and not allow_extra_in_set2:
              lines.append(
                  "    Items in the right set but not the left:"
              )
              for item in sorted(difference2):
                  lines.append(f"       {item!r}")
  
          standard_msg = "\n".join(lines)
          if extra_message:
              standard_msg += f"\n{extra_message}"
          raise AssertionError(standard_msg)
  
imports: from __future__ import annotations
  import functools
  import importlib
  import inspect
  import itertools
  import json
  import os
  import pathlib
  import platform
  import sys
  import textwrap
  import warnings
  from collections import Counter
  from enum import Enum
  from typing import Any, Callable, Iterable
  import jsonschema
  import yaml
  from jsonpath_ng.ext import parse
  from rich.console import Console
  from tabulate import tabulate
  from airflow.cli.commands.info_command import Architecture
  from airflow.exceptions import AirflowProviderDeprecationWarning
  from airflow.providers_manager import ProvidersManager
label_desc: Use image node_id 5 for calling a global function with example usage: assert_sets_equal(set1, set_name_1, set2, set_name_2, allow_extra_in_set2, extra_message) without return types