code: def generate_dependencies(
      result_content: list[str],
      dependencies: dict[str, dict[str, list[str] | str]],
  ):
      def generate_parsed_extras(type: ParsedDependencyTypes):
          result_content.append(f"    # {type.value}")
          for extra in FOUND_EXTRAS[type.value]:
              result_content.append(f'    "apache-airflow[{extra}]",')
  
      def get_python_exclusion(
          dependency_info: dict[str, list[str] | str]
      ):
          excluded_python_versions = dependency_info.get(
              "excluded-python-versions"
          )
          exclusion = ""
          if excluded_python_versions:
              separator = ";"
              for version in excluded_python_versions:
                  exclusion += (
                      f'{separator}python_version != \\"{version}\\"'
                  )
                  separator = " and "
          return exclusion
  
      for dependency, dependency_info in dependencies.items():
          if dependency_info["state"] in ["suspended", "removed"]:
              continue
          result_content.append(f"{normalize_extra(dependency)} = [")
          deps = dependency_info["deps"]
          if not isinstance(deps, list):
              raise TypeError(
                  f"Wrong type of 'deps' {deps} for {dependency} in {DEPENDENCIES_JSON_FILE_PATH}"
              )
          for dep in deps:
              if dep.startswith("apache-airflow-providers-"):
                  dep = convert_to_extra_dependency(dep)
              elif dep.startswith("apache-airflow>="):
                  continue
              result_content.append(
                  f'  "{dep}{get_python_exclusion(dependency_info)}",'
              )
          devel_deps = dependency_info.get("devel-deps")
          if devel_deps:
              result_content.append(
                  f"  # Devel dependencies for the {dependency} provider"
              )
              for dep in devel_deps:
                  result_content.append(
                      f'  "{dep}{get_python_exclusion(dependency_info)}",'
                  )
          result_content.append("]")
      result_content.append("all = [")
      generate_parsed_extras(ParsedDependencyTypes.CORE_EXTRAS)
      generate_parsed_extras(
          ParsedDependencyTypes.APACHE_NO_PROVIDER_EXTRAS
      )
      result_content.append("    # Provider extras")
      for dependency, dependency_info in dependencies.items():
          result_content.append(
              f'    "apache-airflow[{normalize_extra(dependency)}]",'
          )
      result_content.append("]")
      result_content.append("devel-all = [")
      result_content.append('    "apache-airflow[all]",')
      result_content.append('    "apache-airflow[devel]",')
      result_content.append('    "apache-airflow[doc]",')
      result_content.append('    "apache-airflow[doc-gen]",')
      result_content.append('    "apache-airflow[saml]",')
      generate_parsed_extras(
          ParsedDependencyTypes.APACHE_NO_PROVIDER_EXTRAS
      )
      result_content.append("    # Include all provider deps")
      for dependency, dependency_info in dependencies.items():
          result_content.append(
              f'    "apache-airflow[{normalize_extra(dependency)}]",'
          )
      result_content.append("]")
  
imports: from __future__ import annotations
  import hashlib
  import json
  import os
  import sys
  from ast import Import, ImportFrom, NodeVisitor, parse
  from collections import defaultdict
  from enum import Enum
  from pathlib import Path
  from typing import Any, List
  import yaml
  from rich.console import Console
label_desc: Use image node_id 10 for calling a global function with example usage: generate_dependencies(result_content, dependencies) and returns: exclusion