code: def get_related_providers(
      provider_to_check: str,
      upstream_dependencies: bool,
      downstream_dependencies: bool,
  ) -> set[str]:
      """
      Gets cross dependencies of a provider.
  
      :param provider_to_check: id of the provider to check
      :param upstream_dependencies: whether to include providers that depend on it
      :param downstream_dependencies: whether to include providers it depends on
      :return: set of dependent provider ids
      """
      if not upstream_dependencies and not downstream_dependencies:
          raise ValueError(
              "At least one of upstream_dependencies or downstream_dependencies must be True"
          )
      related_providers = set()
      if upstream_dependencies:
          # Providers that use this provider
          for provider, provider_info in DEPENDENCIES.items():
              if (
                  provider_to_check
                  in provider_info["cross-providers-deps"]
              ):
                  related_providers.add(provider)
      # and providers we use directly
      if downstream_dependencies:
          for dep_name in DEPENDENCIES[provider_to_check][
              "cross-providers-deps"
          ]:
              related_providers.add(dep_name)
      return related_providers
  
imports: from __future__ import annotations
  import json
  import yaml
  from airflow_breeze.utils.github import get_tag_date
  from airflow_breeze.utils.path_utils import AIRFLOW_PROVIDERS_ROOT, PROVIDER_DEPENDENCIES_JSON_FILE_PATH
label_desc: Use image node_id 1 for calling a global function with example usage: get_related_providers(provider_to_check, upstream_dependencies, downstream_dependencies) and returns: related_providers